This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: A ELF_LINK_NON_GOT_REF patch
- To: hjl@varesearch.com
- Subject: Re: A ELF_LINK_NON_GOT_REF patch
- From: Ian Lance Taylor <ian@zembu.com>
- Date: 9 Sep 1999 22:26:43 -0400
- CC: binutils@sourceware.cygnus.com
- References: <19990909225145.9177B3FC1@varesearch.com>
Date: Thu, 9 Sep 1999 15:51:45 -0700 (PDT)
From: hjl@varesearch.com (H.J. Lu)
I need this patch. Otherwise, I get
# cat main.c
extern char *sys_errlist[] ;
main ()
{
return sys_errlist[0]== 0;
}
# gcc main.c
/usr/i386-redhat-linux/bin/ld: /tmp/ccZizvat.o: warning: unresolvable
relocation against symbol `sys_errlist@@GLIBC_2.1' from .text section
on Linux/glibc 2.1.
I don't have glibc 2.1. Can you give me a standalone test case?
Your patch isn't correct. You don't consider the various error and
multiple definition cases.
I also don't see why it is needed. The code which does consider the
other cases already copies the flag. Do you have Andreas's patch in
your sources?
1999-09-06 Andreas Schwab <schwab@suse.de>
* elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
to version symbols.
The weakdef flag is copied down in elf_adjust_dynamic_symbol.
I'll note that comments like ``very tricky'' are fine when you explain
the trickiness. When you don't, they are a poster child for
unmaintainable code.
Ian