This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ELIBBAD when linked with gold


On Fri, Aug 1, 2014 at 4:30 AM, Erwan Legrand <lists@erwanlegrand.com> wrote:
>
> It turns out one of the object files linked contains a .interp
> section. This comes from a generated C file which contains the
> following line:
> const char dadi_interp[] __attribute__((section(".interp"))) =
> "/lib/ld-linux.so.2";
>
> (I'm going to remove this line.)
>
> It turns out that in the case of ld.bfd, the -dynamic-linker command
> line parameter takes precedence over the .interp section in the object
> file and ld.gold behaviour's differ. I'd say that ld.bfd's behaviour
> is the more appropriate, i.e. command line args should take precedence
> over anything else.

This is a no-win situation.  The linker shouldn't discard data from
input files, and it shouldn't ignore the -dynamic-linker option.
Probably the best thing would be to give an error.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]