This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
hpux64-hp-hpux11.00: .rela.opd problems
- From: ross dot alexander at uk dot neceur dot com
- To: binutils at sources dot redhat dot com
- Date: Wed, 26 Jun 2002 16:32:29 +0100
- Subject: hpux64-hp-hpux11.00: .rela.opd problems
Currently (binutils-020624) puts EPLT relocations in .rela.dyn. I can
change the emulation script to put
them in the .rela.opd but dld claims the shared library is not a valid load
module.
The .rela.opd are quite different. HP creates then as offsets from a local
section in .dynsym.
.rela.opd: (relocations for section 0, )
*** Relocations ***
Offset Type Addend Symbol
0x8000000100000000 EPLT 0x0000000000000398 __text_seg
0x8000000100000010 EPLT 0x0000000000000400 __text_seg
0x8000000100000020 EPLT 0x0000000000000468 __text_seg
0x8000000100000030 EPLT 0x00000000000004d0 __text_seg
.rela.plt: (relocations for section 0, )
*** Relocations ***
Offset Type Addend Symbol
0x8000000100000050 IPLT 0x0000000000000000 malloc
*** Symbol Table ***
.dynsym:
Index Type Bind Other Sect Value Size Name
0 NOTY LOCL 0 UNDEF 0x0000000000000000 0
1 SECT LOCL 0 0x1 0x40000000000001c8 0 __text_seg
2 SECT LOCL 0 0xa 0x8000000100000000 0 __data_seg
3 SECT LOCL 0 0x15 0x8000000100000060 0
__thread_specific_seg
4 FUNC GLOB 0 0x9 0x8000000100000000 104 f1
5 FUNC GLOB 0 0x9 0x8000000100000010 104 f2
6 FUNC GLOB 0 0x9 0x8000000100000020 104 f3
7 FUNC GLOB 0 0x9 0x8000000100000030 104 f4
8 FUNC GLOB 0 UNDEF 0x0000000000000000 0 malloc
9 OBJT GLOB 0 0x1 0x40000000000001c8 0 _DYNAMIC
Binutils creates global NOTY entries in .dynsym and references them.
.rela.opd: (relocations for section 12, .opd)
*** Relocations ***
Offset Type Addend Symbol
0x8000000000001010 EPLT 0x0000000000000000 .f3
0x8000000000001030 EPLT 0x0000000000000000 .f2
0x8000000000001050 EPLT 0x0000000000000000 .f4
0x8000000000001070 EPLT 0x0000000000000000 .f1
.rela.plt: (relocations for section 13, .plt)
*** Relocations ***
Offset Type Addend Symbol
0x8000000000001090 IPLT 0x0000000000000000 malloc
*** Symbol Table ***
.dynsym:
Index Type Bind Other Sect Value Size Name
0 NOTY LOCL 0 UNDEF 0x0000000000000000 0
1 SECT LOCL 0 0x1 0x4000000000001120 0
2 SECT LOCL 0 0x2 0x4000000000001250 0
3 SECT LOCL 0 0x3 0x4000000000001328 0
4 SECT LOCL 0 0x4 0x4000000000001670 0
5 SECT LOCL 0 0x5 0x40000000000016b0 0
6 SECT LOCL 0 0x6 0x4000000000001710 0
7 SECT LOCL 0 0x7 0x4000000000001728 0
8 SECT LOCL 0 0x8 0x4000000000001728 0
9 SECT LOCL 0 0x9 0x40000000000018d8 0
10 SECT LOCL 0 0xa 0x40000000000018d8 0
11 SECT LOCL 0 0xb 0x8000000000001000 0
12 SECT LOCL 0 0xc 0x8000000000001010 0
13 SECT LOCL 0 0xd 0x8000000000001090 0
14 SECT LOCL 0 0xe 0x80000000000010a0 0
15 SECT LOCL 0 0xf 0x80000000000010a0 0
16 SECT LOCL 0 0x10 0x0000000000000000 0
17 SECT LOCL 0 0x11 0x0000000000000000 0
18 SECT LOCL 0 0x12 0x0000000000000000 0
19 SECT LOCL 0 0x13 0x0000000000000000 0
20 SECT LOCL 0 0x14 0x0000000000000000 0
21 SECT LOCL 0 0x15 0x0000000000000000 0
22 NOTY GLOB 0 0x8 0x4000000000001870 0 .f4
23 OBJT GLOB 0 0x1 0x4000000000001120 0 _DYNAMIC
24 NOTY GLOB 0 0x8 0x4000000000001728 0 .f1
25 FUNC GLOB 0 UNDEF 0x0000000000000000 0 malloc
26 FUNC GLOB 0 0xc 0x8000000000001010 104 f3
27 FUNC GLOB 0 0xc 0x8000000000001030 104 f2
28 NOTY GLOB 0 0x8 0x4000000000001790 0 .f2
29 NOTY GLOB 0 ABSOL 0x0000000000000000 0 __bss_start
30 FUNC GLOB 0 0xc 0x8000000000001050 104 f4
31 FUNC GLOB 0 0xc 0x8000000000001070 104 f1
32 NOTY GLOB 0 ABSOL 0x0000000000000000 0 _edata
33 NOTY GLOB 0 ABSOL 0x80000000000010a0 0 _end
34 NOTY GLOB 0 0x8 0x4000000000001808 0 .f3
There is a note in elf64-hppa.c
/* This may not be necessary or desirable anymore now that
we have some support for dealing with section symbols
in dynamic relocs. But name munging does make the result
much easier to debug. ie, the EPLT reloc will reference
a symbol like .foobar, instead of .text + offset. */
So the question is how difficult is it to do this, and is this the problem
anyway?
Cheers,
Ross
---------------------------------------------------------------------------------
Ross Alexander "He knows no more about his
MIS - NEC Europe Limited destiny than a tea leaf knows
Work ph: +44 20 8752 3394 the history of East India Company"