IA64 bug with -z defs
H. J. Lu
hjl@lucon.org
Wed Jun 23 06:56:00 GMT 2004
On Thu, Jun 17, 2004 at 04:03:08PM +1000, Ian Wienand wrote:
> Hi,
>
> This recently came up from a problem with gnome stuff in Debian on
> IA64. Basically, a developer added -Wl,-z,defs to a build, and IA64
> broke.
>
> Looking into it, say you have a simple shared library
>
> --- l.c ---
> int fn(int i)
> {
> return notfound(i+1)
> }
> ---
>
> and do this
>
> $ gcc -g -shared -o libl.so l.c
> $ gcc -g -Wl,-z,defs -shared -o libl.bad.so l.c
> /tmp/ccCYI3Wd.o(.text+0x42): In function `fn':
> /usr/src/binutils-test/l.c:3: warning: undefined reference to `notfound'
> $ objdump --disassemble libl.so > good.dump
> $ objdump --disassemble libl.bad.so > bad.dump
> $ diff -u good.dump bad.dump
It should be fixed in the Linux binutils 2.15.90.0.2:
Changes from binutils 2.15.90.0.1.1:
1. Update from binutils 2004 0412.
2. Add --as-needed/--no-as-needed to linker.
3. Fix -z defs in linker.
4. Always reserve the memory for ia64 dynamic linker.
5. Fix a race condition in ia64 lazy binding.
The current one is 2.15.91.0.1.
H.J.
More information about the Binutils
mailing list