Confused by MIPS.options in ELF64
Alex Gonzalez
langabe@gmail.com
Fri Jul 27 15:48:00 GMT 2007
Hi,
I am porting a 32bits MIPS application to 64 bits. Using readelf to
compare the results, the 64bits version has a MIPS.options section
which seems misplaced.
I am using ld to link statically with -Ttext and the default linker
script. I am just an ld user with no deeper experience, but it seems
to me that the default script doesn't handle the MIPS.options section
appropriately.
The ELF64 ABI states that the options section has to follow the
program header table, and it indeed does.
But then, if I try to use objcopy to produce a raw binary file, it
produces a huge file. I need a raw binary file to launch the program.
Could anyone shed some light on this issue? Any pointer is very much
appreciated.
Thanks,
Alex
PS: The readelf of both files as reference,
pub/bin/p1/pv1000_p1.elf: file format elf64-tradbigmips
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00090fa0 0000000081000000 0000000081000000 00001c60 2**5
CONTENTS, ALLOC, LOAD, CODE
1 .MIPS.options 00001ba8 00000000100000b0 00000000100000b0 000000b0 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .rodata 00017c70 0000000081090fa0 0000000081090fa0 00092c00 2**4
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .data 00007a60 00000000810a8c10 00000000810a8c10 000aa870 2**4
CONTENTS, ALLOC, LOAD, DATA
4 .got 00007e08 00000000810b0670 00000000810b0670 000b22d0 2**4
CONTENTS, ALLOC, LOAD, DATA
5 .sbss 00000000 00000000810b8478 00000000810b8478 000ba0e0 2**0
ALLOC
6 .bss 007985c0 00000000810b8480 00000000810b8480 000ba0e0 2**5
ALLOC
7 .comment 000017a7 0000000000000000 0000000000000000 000ba0e0 2**0
CONTENTS, READONLY
8 .debug_aranges 00002ac0 0000000000000000 0000000000000000 000bb890 2**4
CONTENTS, READONLY, DEBUGGING
9 .debug_pubnames 00007736 0000000000000000 0000000000000000 000be350 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_info 001fe1ea 0000000000000000 0000000000000000 000c5a86 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_abbrev 00019de6 0000000000000000 0000000000000000 002c3c70 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_line 0003e917 0000000000000000 0000000000000000 002dda56 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_frame 00015e90 0000000000000000 0000000000000000 0031c370 2**3
CONTENTS, READONLY, DEBUGGING
14 .debug_str 00010469 0000000000000000 0000000000000000 00332200 2**0
CONTENTS, READONLY, DEBUGGING
15 .debug_macinfo 0028e064 0000000000000000 0000000000000000 00342669 2**0
CONTENTS, READONLY, DEBUGGING
16 .pdr 0000aa80 0000000000000000 0000000000000000 005d06d0 2**2
CONTENTS, READONLY
17 .mdebug.abi64 00000000 0000000000000000 0000000000000000 005db150 2**0
CONTENTS, READONLY
18 .debug_ranges 00000680 0000000000000000 0000000000000000 005db150 2**0
CONTENTS, READONLY, DEBUGGING
pub/bin/p1/pv1000_p1.elf: file format elf32-ntradbigmips
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0008fd00 81000000 81000000 000000a0 2**5
CONTENTS, ALLOC, LOAD, CODE
1 .rodata 000183a0 8108fd00 8108fd00 0008fda0 2**4
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .reginfo 00000018 810a80a0 810a80a0 000a8140 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA, LINK_ONCE_SAME_SIZE
3 .data 00004fb0 810a80c0 810a80c0 000a8160 2**4
CONTENTS, ALLOC, LOAD, DATA
4 .got 00003f94 810ad070 810ad070 000ad110 2**4
CONTENTS, ALLOC, LOAD, DATA
5 .sbss 00000000 810b1004 810b1004 000b10c0 2**0
ALLOC
6 .bss 0053f674 810b1020 810b1020 000b10c0 2**5
ALLOC
7 .comment 000017a7 00000000 00000000 000b10c0 2**0
CONTENTS, READONLY
8 .debug_aranges 00001580 00000000 00000000 000b2868 2**3
CONTENTS, READONLY, DEBUGGING
9 .debug_pubnames 00005bba 00000000 00000000 000b3de8 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_info 00148693 00000000 00000000 000b99a2 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_abbrev 00016b40 00000000 00000000 00202035 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_line 0003d537 00000000 00000000 00218b75 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_frame 0000c3f4 00000000 00000000 002560ac 2**2
CONTENTS, READONLY, DEBUGGING
14 .debug_str 00011dc5 00000000 00000000 002624a0 2**0
CONTENTS, READONLY, DEBUGGING
15 .debug_macinfo 0028dc80 00000000 00000000 00274265 2**0
CONTENTS, READONLY, DEBUGGING
16 .pdr 0000ab20 00000000 00000000 00501ee8 2**2
CONTENTS, READONLY
17 .mdebug.abiN32 00000000 00000000 00000000 0050ca08 2**0
CONTENTS, READONLY
18 .debug_ranges 00000310 00000000 00000000 0050ca08 2**0
CONTENTS, READONLY, DEBUGGING
More information about the Binutils
mailing list