This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug go/81926] go/parse.o differs between stage2 and stage3 for gcc 7.2.0
- From: "dclarke at blastwave dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Aug 2017 20:25:01 +0000
- Subject: [Bug go/81926] go/parse.o differs between stage2 and stage3 for gcc 7.2.0
- Auto-submitted: auto-generated
- References: <bug-81926-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81926
--- Comment #2 from Dennis Clarke <dclarke at blastwave dot org> ---
the ELF section header table seems
to be in a slightly different place between the two files :
d$ elfdump -delv stage2-gcc/go/parse.o
ELF Header
ei_magic: { 0x7f, E, L, F }
ei_class: ELFCLASS64 ei_data: ELFDATA2MSB
ei_osabi: ELFOSABI_NONE ei_abiversion: 0
e_machine: EM_SPARCV9 e_version: EV_CURRENT
e_type: ET_REL
e_flags: [ EF_SPARCV9_TSO ]
e_entry: 0 e_ehsize: 64 e_shstrndx: 1
e_shoff: 0x3b7cd8 e_shentsize: 64 e_shnum: 86
e_phoff: 0 e_phentsize: 0 e_phnum: 0
d$ elfdump -delv stage3-gcc/go/parse.o
ELF Header
ei_magic: { 0x7f, E, L, F }
ei_class: ELFCLASS64 ei_data: ELFDATA2MSB
ei_osabi: ELFOSABI_NONE ei_abiversion: 0
e_machine: EM_SPARCV9 e_version: EV_CURRENT
e_type: ET_REL
e_flags: [ EF_SPARCV9_TSO ]
e_entry: 0 e_ehsize: 64 e_shstrndx: 1
e_shoff: 0x3b7cd0 e_shentsize: 64 e_shnum: 86
e_phoff: 0 e_phentsize: 0 e_phnum: 0
d$
So there I see 0x3b7cd8 in stage2 and 0x3b7cd0 in stage3.
At first glance there appears to be only an 8 byte difference in the
size of the file but looking down through the various sections in the
ELF data for both files I see the same data represented in very similar
places but yet, slightly different. For example the ELF header offset
is 0x3b7cd0 in one of them and 0x3b7cd8 in the other. Is this a valid
functional difference at all? Perhaps a bug lay inside the linker which
created the actual object file? Looking at both files and the ELF data
between them I see the exact same data in both and yet in different
addresses :
stage 2 :
Section Header[44]: sh_name: .bss
sh_addr: 0 sh_flags: [ SHF_WRITE SHF_ALLOC ]
sh_size: 0x11 sh_type: [ SHT_NOBITS ]
sh_offset: 0x204458 sh_entsize: 0
sh_link: 0 sh_info: 0
sh_addralign: 0x4
stage 3 :
Section Header[44]: sh_name: .bss
sh_addr: 0 sh_flags: [ SHF_WRITE SHF_ALLOC ]
sh_size: 0x11 sh_type: [ SHT_NOBITS ]
sh_offset: 0x204450 sh_entsize: 0
sh_link: 0 sh_info: 0
sh_addralign: 0x4
That sort of difference lay between the two files in many many places.
Slightly different by 8 bytes again however nm tells me that the symbol
listing is identical between the two files. Perhaps there is no actual
"functional" difference between the files at all.