This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Implement a command line switch to prevent section GC from removing exported symbols
- From: Alan Modra <amodra at gmail dot com>
- To: fincs fincs <fincs dot alt1 at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 14 Dec 2016 14:15:37 +1030
- Subject: Re: [PATCH] Implement a command line switch to prevent section GC from removing exported symbols
- Authentication-results: sourceware.org; auth=none
- References: <CAC28BQvCNr6-n0xCaS9Nr0jFyVHaZ6SY9vZvMYf8BNZqD9n19A@mail.gmail.com>
On Wed, Dec 14, 2016 at 01:18:41AM +0100, fincs fincs wrote:
> Some people in the past have apparently encountered this problem too:
>
> http://osdir.com/ml/gcc.g++.general/2006-04/msg00025.html
This was someone not understanding how linking with archive libraries
works.
> https://lists.freedesktop.org/archives/systemd-devel/2014-November/025626.html
This was about a linker bug, since fixed.
> http://osdir.com/ml/gcc.g++.general/2006-04/msg00036.html
And this is another message in the same thread about archive
libraries.
> This seems like an inelegant and unmaintainable solution so I propose
> adding a command line switch to LD that
> enables the behaviour that already exists in shared object linking for
> any kind of ELF executable. Please see
> attached patch implementing my proposal.
Why doesn't --export-dynamic work for you?
--
Alan Modra
Australia Development Lab, IBM