NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-macppc/52564: current ofwboot.xcf crashes because of .eh_frame* in .text



The following reply was made to PR port-macppc/52564; it has been noted by GNATS.

From: scole_mail <scole_mail%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-macppc/52564: current ofwboot.xcf crashes because of .eh_frame* in .text
Date: Wed, 20 Sep 2017 19:08:59 -0700

 >>  
 >>  I.e. where does .eh_frame come from?
 >>
 
 I guess there is still some compile dependency or something I'm not
 understanding.
 
 I re-made a clean everything with elf32_powerpc_merge.x updated, and I
 couldn't boot anymore.  It looks like the flags in
 src/sys/arch/macppc/stand/Makefile.inc
 
 CFLAGS_UNWIND.gcc=	-fno-unwind-tables -fno-asynchronous-unwind-tables
 CFLAGS_UNWIND.clang=	-fno-unwind-tables
 LINKFLAGS_UNWIND=	--no-ld-generated-unwind-info
 
 were being honored and not putting .eh_frame* into ofwboot.elf/.xcf,
 which is different than I had tested earlier:
 
 > powerpc--netbsd-readelf -S ofwboot.elf
 There are 12 section headers, starting at offset 0xfaf4:
 
 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        00e00000 000060 00dfb4 00 WAX  0   0 16
   [ 2] .rodata           PROGBITS        00e0dfb4 00e014 001718 00   A  0   0  4
   [ 3] .data             PROGBITS        00e0f6d0 00f730 000235 00  WA  0   0  8
   [ 4] .sdata            PROGBITS        00e0f908 00f968 00001e 00  WA  0   0  4
   [ 5] .sbss             NOBITS          00e0f928 00f986 000049 00  WA  0   0  4
   [ 6] .bss              NOBITS          00e0f978 00f986 002700 00  WA  0   0  8
   [ 7] .comment          PROGBITS        00000000 00f986 000021 01  MS  0   0  1
   [ 8] .note             NOTE            00000000 00f9a8 00006c 00      0   0  4
   [ 9] .ident            PROGBITS        00000000 00fa14 000076 00      0   0  1
   [10] .gnu.attributes   LOOS+0xffffff5  00000000 00fa8a 000010 00      0   0  1
   [11] .shstrtab         STRTAB          00000000 00fa9a 000057 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), G (group), T (TLS),
   C (compressed), x (unknown), o (OS specific), E (exclude),
   p (processor specific)
 
 but, no .eh_frame* seems to have prevented me from booting. Why does
 tsize=10000 ?
 
 0 > boot file: 10.0.0.1,ofwboot.xcfloading XCOFF
 tsize=10000 dsize=258 bsize=2750 entry=E00000 
 SECTIONS:
 .text    00E00000 00E00000 00010000 00001000
 .data    00E10000 00E10000 00000258 00011000
 .bss     00E10258 00E10258 00002750 00000000
 .gnu.att 00000000 00000000 00000010 00011258
 .ident   00000000 00000000 00000076 00011268
 loading .textDEFAULT CATCH!, code=FFF00300 
  ok
 
 So I commented out the flags above, recompiled, and got the .en_frame*
 stuff back:
 
 > powerpc--netbsd-readelf -S ofwboot.elf
 There are 13 section headers, starting at offset 0x102ac:
 
 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        00e00000 000060 00dfb4 00 WAX  0   0 16
   [ 2] .rodata           PROGBITS        00e0dfb4 00e014 001718 00   A  0   0  4
   [ 3] .eh_frame         PROGBITS        00e0f6cc 00f72c 0007b4 00   A  0   0  4
   [ 4] .data             PROGBITS        00e0fe80 00fee0 000235 00  WA  0   0  8
   [ 5] .sdata            PROGBITS        00e100b8 010118 00001e 00  WA  0   0  4
   [ 6] .sbss             NOBITS          00e100d8 010136 000049 00  WA  0   0  4
   [ 7] .bss              NOBITS          00e10128 010136 002700 00  WA  0   0  8
   [ 8] .comment          PROGBITS        00000000 010136 000021 01  MS  0   0  1
   [ 9] .note             NOTE            00000000 010158 00006c 00      0   0  4
   [10] .ident            PROGBITS        00000000 0101c4 000076 00      0   0  1
   [11] .gnu.attributes   LOOS+0xffffff5  00000000 01023a 000010 00      0   0  1
   [12] .shstrtab         STRTAB          00000000 01024a 000061 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), G (group), T (TLS),
   C (compressed), x (unknown), o (OS specific), E (exclude),
   p (processor specific)
 
 which allowed booting, tsize=F6E0, more reasonable...
 
 0 > boot file: 10.0.0.1,ofwboot.xcfloading XCOFF
 tsize=F6E0 dsize=258 bsize=2750 entry=E00000 
 SECTIONS:
 .text    00E00000 00E00000 0000F6E0 00001000
 .eh_fram 00E0F6DC 00E0F6DC 00000920 000106E0
 .data    00E10000 00E10000 00000258 00011000
 .bss     00E10258 00E10258 00002750 00000000
 .gnu.att 00000000 00000000 00000010 00011258
 .ident   00000000 00000000 00000076 00011268
 loading .text, done..
 loading .data, done..
 clearing .bss, done..
 
 Here are the file sizes, .xcf sizes aren't different?
 
 with .en_frame:
 > ls -l  ofwboot.xcf ofwboot.elf
 -rwxr-xr-x  1 scole  users  66740 Sep 20 18:40 ofwboot.elf
 -rwxr-xr-x  1 scole  users  81486 Sep 20 18:40 ofwboot.xcf
 
 without .en_frame:
 > ls -l ofwboot.xcf ofwboot.elf
 -rwxr-xr-x  1 scole  users  64724 Sep 20 18:46 ofwboot.elf
 -rwxr-xr-x  1 scole  users  81486 Sep 20 18:46 ofwboot.xcf
 
 I guess I'm not sure what the proper fix is now, perhaps one of changing
 flags Makefile.inc, changing elf32_powerpc_merge.x, or something wrong
 with fixcoff?
 
 Thanks
 


Home | Main Index | Thread Index | Old Index