This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
objcopy test failure on mips-linux
- To: binutils at sourceware dot cygnus dot com
- Subject: objcopy test failure on mips-linux
- From: Andreas Jaeger <aj at suse dot de>
- Date: 14 Mar 2000 14:36:34 +0100
- Cc: geoff at cygnus dot com
On mips-linux the binutils test "objcopy (simple copy)" fails.
Running the test manually:
$ /home/gast/AJ/build-src/binutils/objcopy tmpdir/bintest.o tmpdir/copy.o
I get the following two files which are different in size:
-rw-rw-r-- 1 gast gast 1448 Mar 14 13:41 bintest.o
-rw-rw-r-- 1 gast gast 1452 Mar 14 13:41 copy.o
Have a look at the different readelf outputs - the rela.text and
rel.text sections are different:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ ../readelf -a copy.o
ELF Header:
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, big endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 712 (bytes into file)
Flags: 0x0
Size of this header: 52 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 40 (bytes)
Number of section headers: 11
Section header string table index: 8
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS 00000000 000040 000010 00 AX 0 0 16
[ 2] .rela.text RELA 00000000 0005a0 00000c 0c 9 1 4
[ 3] .rel.text REL 00000000 0005ac 000000 08 9 1 4
[ 4] .data PROGBITS 00000000 000050 000010 00 WA 0 0 16
[ 5] .bss NOBITS 00000000 000060 000000 00 WA 0 0 16
[ 6] .reginfo MIPS_REGINFO 00000000 000060 000018 01 A 0 0 4
[ 7] .mdebug MIPS_DEBUG 00000000 000078 0001fc 01 0 0 4
[ 8] .shstrtab STRTAB 00000000 000274 000052 00 0 0 1
[ 9] .symtab SYMTAB 00000000 000480 0000c0 10 10 6 4
[10] .strtab STRTAB 00000000 000540 00005d 00 0 0 1
Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), O (extra OS processing required)
o (os specific), p (processor specific) x (unknown)
There are no program headers in this file.
There is no dynamic segment in this file.
Relocation section '.rela.text' at offset 0x5a0 contains 1 entries:
Offset Info Type Symbol's Value Symbol's Name Addend
00000004 00802 R_MIPS_32 00000000 external_symbol + 0
Symbol table '.symtab' contains 12 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 SECTION LOCAL DEFAULT 1
2: 00000000 0 SECTION LOCAL DEFAULT 4
3: 00000000 0 SECTION LOCAL DEFAULT 5
4: 00000000 0 SECTION LOCAL DEFAULT 6
5: 00000000 0 SECTION LOCAL DEFAULT 7
6: 00000000 0 OBJECT GLOBAL DEFAULT 1 text_symbol
7: 00000000 0 NOTYPE LOCAL DEFAULT 1 static_text_symbol
8: 00000000 0 NOTYPE GLOBAL DEFAULT UND external_symbol
9: 00000000 0 OBJECT GLOBAL DEFAULT 4 data_symbol
10: 00000000 0 NOTYPE LOCAL DEFAULT 4 static_data_symbol
11: 00000004 4 OBJECT GLOBAL DEFAULT PRC common_symbol
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../readelf -a bintest.o
ELF Header:
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, big endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 712 (bytes into file)
Flags: 0x0
Size of this header: 52 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 40 (bytes)
Number of section headers: 11
Section header string table index: 8
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS 00000000 000040 000010 00 AX 0 0 16
[ 2] .rel.text REL 00000000 0005a0 000008 08 9 1 4
[ 3] .rela.text RELA 00000000 0005a8 000000 0c 9 1 4
[ 4] .data PROGBITS 00000000 000050 000010 00 WA 0 0 16
[ 5] .bss NOBITS 00000000 000060 000000 00 WA 0 0 16
[ 6] .reginfo MIPS_REGINFO 00000000 000060 000018 01 A 0 0 4
[ 7] .mdebug MIPS_DEBUG 00000000 000078 0001fc 01 0 0 4
[ 8] .shstrtab STRTAB 00000000 000274 000052 00 0 0 1
[ 9] .symtab SYMTAB 00000000 000480 0000c0 10 10 6 4
[10] .strtab STRTAB 00000000 000540 00005d 00 0 0 1
Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), O (extra OS processing required)
o (os specific), p (processor specific) x (unknown)
There are no program headers in this file.
There is no dynamic segment in this file.
Relocation section '.rel.text' at offset 0x5a0 contains 1 entries:
Offset Info Type Symbol's Value Symbol's Name
00000004 00802 R_MIPS_32 00000000 external_symbol
Symbol table '.symtab' contains 12 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 SECTION LOCAL DEFAULT 1
2: 00000000 0 SECTION LOCAL DEFAULT 4
3: 00000000 0 SECTION LOCAL DEFAULT 5
4: 00000000 0 SECTION LOCAL DEFAULT 6
5: 00000000 0 SECTION LOCAL DEFAULT 7
6: 00000000 0 OBJECT GLOBAL DEFAULT 1 text_symbol
7: 00000000 0 NOTYPE LOCAL DEFAULT 1 static_text_symbol
8: 00000000 0 NOTYPE GLOBAL DEFAULT UND external_symbol
9: 00000000 0 OBJECT GLOBAL DEFAULT 4 data_symbol
10: 00000000 0 NOTYPE LOCAL DEFAULT 4 static_data_symbol
11: 00000004 4 OBJECT GLOBAL DEFAULT PRC common_symbol
No version information found in this file.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Anybody a idea what's broken or how to fix this?
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de