|
Message-ID: <20210111192420.GC23432@brightrain.aerifal.cx> Date: Mon, 11 Jan 2021 14:24:20 -0500 From: Rich Felker <dalias@...c.org> To: Sagar Tiwari <fctorial@...il.com> Cc: musl@...ts.openwall.com Subject: Re: printf segfaults on recent musl versions On Tue, Jan 12, 2021 at 12:46:40AM +0530, Sagar Tiwari wrote: > I'm assembling a file with clang and linking it to custom compiled > musl with ld. This is the project I'm using: > > https://drive.google.com/file/d/1RiKZTf_nJUak14fz7kSXbh7egJuDthDk/view?usp=sharing In the future, please send attachments not Google Drive links. > musl 1.1.8 is the last version that works with this project. I used > clang 11.0.0 to compile both musl and this project. You can't call libc if you didn't enter the program through its entry point (or an ABI-compatible one). If you name the mn function main, link crt1.o (or the appropriate variant thereof), and drop the linker script (which may be omitting other necessary items), it should work as expected. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.