[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
binutils 2.11: another ARM relocation problem in linker (2)
From: |
Eberhard Mattes |
Subject: |
binutils 2.11: another ARM relocation problem in linker (2) |
Date: |
Mon, 6 Aug 2001 18:00:10 +0200 |
This is probably the same bug as the previous one reported under this
subject; the input files of this report are simpler (not involving
those horrible import libraries) and the output is more broken. This
case might be simpler to debug than the previous one.
Binutils version: 2.11
Configuration: --target=arm-epoc-pe (PE/COFF)
For the appended set of input files, ld writes a relocation which
should not be there. The files are built with this shell script:
------------------------------------------------------------------------
#! /bin/sh
rm -f main.o main.dll tmp.bas tmp.exp tmp.lib tmp.pex main.dll
arm-epoc-pe-as -o main.o main.s
arm-epoc-pe-as -o foo.o foo.s
arm-epoc-pe-as -o bar.o bar.s
arm-epoc-pe-ld -v --dll -e entry --base-file tmp.bas -o tmp.pex main.o foo.o
bar.o
arm-epoc-pe-dlltool --output-lib tmp.lib --input-def main.def \
--dllname main --base-file tmp.bas --output-exp tmp.exp
arm-epoc-pe-ld -v --dll -e entry -o main.dll tmp.exp main.o foo.o bar.o
arm-epoc-pe-objdump -pd main.dll
------------------------------------------------------------------------
Here are the relevant lines from the output of objdump:
------------------------------------------------------------------------
PE File Base Relocations (interpreted .reloc section contents)
Virtual Address: 00001000 Chunk size 12 (0xc) Number of fixups 2
reloc 0 offset 18 [1018] HIGHLOW
reloc 1 offset 0 [1000] ABSOLUTE
private flags = 820: [APCS-32] [floats passed in integer registers] [absolute
position] [interworking not supported]
Disassembly of section .text:
10001000 <__bss_end__>:
10001000: e1a00000 nop (mov r0,r0)
10001004 <bar>:
10001004: e1a00000 nop (mov r0,r0)
10001008 <__CTOR_LIST__>:
10001008: ffffffff swinv 0x00ffffff
1000100c: 00000000 andeq r0, r0, r0
10001010 <__DTOR_LIST__>:
10001010: ffffffff swinv 0x00ffffff
10001014: 00000000 andeq r0, r0, r0
10001018 <etext>:
10001018: 10001000 andne r1, r0, r0
...
------------------------------------------------------------------------
reloc 1 should not be there, the symbol `bar' is not referenced from
the code, it's only exported.
Here are the input files:
main.s:
------------------------------------------------------------------------
.text
.global entry
entry:
.section .rdata
.word foo
------------------------------------------------------------------------
main.def:
------------------------------------------------------------------------
EXPORTS
bar @ 1 NONAME
------------------------------------------------------------------------
foo.s:
------------------------------------------------------------------------
.text
.globl foo
foo: nop
------------------------------------------------------------------------
bar.s:
------------------------------------------------------------------------
.text
.globl bar
bar: nop
------------------------------------------------------------------------
Eberhard Mattes
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- binutils 2.11: another ARM relocation problem in linker (2),
Eberhard Mattes <=