ld can leave undefined symbols in non-relocatable output

Dave Korn dave.korn.cygwin@googlemail.com
Mon Aug 3 21:50:00 GMT 2009


Joshua Oreman wrote:
> Hi everyone,
> 
> I'm on x86_64 using binutils 2.18.0 on GNU/Linux. I've recently run
> across some counterintuitive behavior in the linker, but I'm not sure
> whether it's intended or not. I was hoping someone on this list might
> be able to clarify whether this is intended and dependable behavior,
> or a bug.

  This is completely as intended and by design.  You can leave undefined
references in ELF executables (both SO libs and applications) and they are
filled in by the dynamic loader at runtime.  Therefore it is not seen as an
error at link-time if the definition is not available then; it may be supplied
by a library that is only available then.

    cheers,
      DaveK



More information about the Binutils mailing list