This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld can leave undefined symbols in non-relocatable output
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Joshua Oreman <oremanj at rwcr dot net>
- Cc: binutils at sourceware dot org
- Date: Mon, 03 Aug 2009 23:03:42 +0100
- Subject: Re: ld can leave undefined symbols in non-relocatable output
- References: <197f0ba30908021318p27ec03ddl9f52f97b95b4ab53@mail.gmail.com>
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