LD: Cannot add content to ctors section

H.J. Lu hjl.tools@gmail.com
Wed May 20 17:00:05 GMT 2020


On Wed, May 20, 2020 at 6:35 AM Ben Hirschberg <bhirschb@cyberarmor.io> wrote:
>
> Could I add my own crt0 to my shared object and call my .init_array functions?
> ________________________________
> From: H.J. Lu <hjl.tools@gmail.com>
> Sent: Wednesday, May 20, 2020 4:22:37 PM
> To: Ben Hirschberg <bhirschb@cyberarmor.io>
> Cc: binutils@sourceware.org <binutils@sourceware.org>
> Subject: Re: LD: Cannot add content to ctors section
>
> On Wed, May 20, 2020 at 6:21 AM Ben Hirschberg <bhirschb@cyberarmor.io> wrote:
> >
> > I don't want to blame here anyone, both musl guys and the people at Go have their arguments.
> >
> > I am rather looking for a workaround and trying to pick your brain.
> >
> > Is there a way I can tell linker not to put this function in .init_array but .ctors?
>
> Use a very old (maybe broken) linker.
>

I was told that what Go does was wrong.  There is nothing linker can do.

-- 
H.J.


More information about the Binutils mailing list