[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/180] New: missing dynamic relocation record
From: |
truk at optonline dot net |
Subject: |
[Bug ld/180] New: missing dynamic relocation record |
Date: |
25 May 2004 18:17:40 -0000 |
On OpenBSD-current (post 3.5 release) using gcc 2.95.3 or 3.3.2 to build the
1.3.1 jdk a shared library is created with a missing dynamic relocation record.
The shared library (libjava_g.so) uses strdup and strcpy from libc. The linker
creates a dynamic relocation record for strdup, but not for strcpy:
$ objdump -R libjava_g.so | grep -e strcpy -e strdup
20004b60 R_386_JUMP_SLOT strdup
However both strcpy and strdup appear in the dynamic symbol table:
$ objdump -T libjava_g.so | grep -e strcpy -e strdup
00000000 D *UND* 00000000 strcpy
00000000 D *UND* 00000000 strdup
Here is the link command with the list of .o files snipped:
Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd3.5/3.3.2/specs
Configured with:
Thread model: single
gcc version 3.3.2 (propolice)
/usr/lib/gcc-lib/i386-unknown-openbsd3.5/3.3.2/collect2 -shared -Bdynamic -
dynamic-linker /usr/libexec/ld.so
-o ../../../build/bsd-i386/lib/i386/libjava.so /usr/lib/crtbeginS.o -
L../../../build/bsd-i386/lib/i386
-L/usr/local/lib -L/usr/X11R6/lib -L../../../build/bsd-
i386/tmp/java/java.lang/java/obj/../../../fdlibm/obj
-L/usr/lib/gcc-lib/i386-unknown-openbsd3.5/3.3.2/fpic -L/usr/lib/gcc-lib/i386-
unknown-openbsd3.5/3.3.2
-E <sniped o.files> -lverify -lfdlibm.i386 -lgcc -lgcc /usr/lib/crtendS.o
One other thing I noticed was that strcpy is the first undefined symbol lised
in the dynamic symbol table:
DYNAMIC SYMBOL TABLE:
00000134 l d .hash 00000000
00000cfc l d .dynsym 00000000
00002b8c l d .dynstr 00000000
00005930 l d .gnu.version 00000000
00005d04 l d .gnu.version_r 00000000
00005d24 l d .rel.dyn 00000000
00006cec l d .rel.plt 00000000
00007330 l d .init 00000000
00007338 l d .plt 00000000
00007fb8 l d .text 00000000
00015690 l d .fini 00000000
20000000 l d .rodata 00000000
20003000 l d .data 00000000
200038b8 l d .dynamic 00000000
20004978 l d .gotpad0 00000000
20004978 l d .got 00000000
20004cc4 l d .ctors 00000000
20004ccc l d .dtors 00000000
20004cd4 l d .gotpad1 00000000
20005ce0 l d .bss 00000000
00000000 l d .stab 00000000
00000000 l d .stabstr 00000000
00014664 g DF .text 000008dc Base __j__kernel_rem_pio2
00010b44 g DF .text 00000108 Base Java_java_io_UnixFileSystem_rename
000084d0 g DF .text 0000002e Base
Java_java_lang_reflect_Array_setDouble
00000000 D *UND* 00000000 strcpy
...etc...
--
Summary: missing dynamic relocation record
Product: binutils
Version: 2.14
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: truk at optonline dot net
CC: bug-binutils at gnu dot org
GCC build triplet: i386-unknown-openbsd3.5
GCC host triplet: i386-unknown-openbsd3.5
GCC target triplet: i386-unknown-openbsd3.5
http://sources.redhat.com/bugzilla/show_bug.cgi?id=180
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/180] New: missing dynamic relocation record,
truk at optonline dot net <=