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]

Regression: --gc-sections: local symbol `_dl_argv@@GLIBC_PRIVATE' in ld.so is referenced by DSO (PR ld/13232) [Re: PATCH: PR ld/13177: garbage collector retains zombie references to external libraries]


Hi H.J.,

3475fe928892df696f6ea9b2c912e1379591e736 is the first bad commit

On Wed, 14 Sep 2011 21:14:38 +0200, H.J. Lu wrote:
> 2011-09-14  H.J. Lu  <hongjiu.lu@intel.com>
>
>       PR ld/13177
>       * elflink.c (elf_gc_sweep_symbol): Also hide symbols without PLT
>       nor GOT references.

echo 'int main(void){return 0;}'|gcc -o 1.o -c -Wall -x c -;gcc -v -o 1 1.o -Wall -Wl,--gc-sections

# OK but replace collect2 (old system BFD ld) with BFD HEAD ld:

.../ld/ld-new --build-id --no-add-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o 1 /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.6.1/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.6.1 -L/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../.. 1.o --gc-sections -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.6.1/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/crtn.o

ld-new: 1: local symbol `_dl_argv@@GLIBC_PRIVATE' in /lib64/ld-linux-x86-64.so.2 is referenced by DSO
ld-new: final link failed: Bad value

Tested on fedora-16-x86_64.  gold works OK.


Thanks,
Jan


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