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: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-macppc/52564: current ofwboot.xcf crashes because of
 .eh_frame* in .text
Date: Sun, 24 Sep 2017 03:24:57 +0300

 Ok, just to be clear, the timeline here seems to be:
 
 1) my commit to elf32_powerpc_merge.x to merge .eh_frame* to .text
 2) my commit to ../Makefile.inc to disable .eh_frame generation
 3) christos@ commit to keep .eh_frame section
 4) commenting out unwind-related flags in ../Makefile.inc
 
 On Thu, Sep 21, 2017 at 02:10:01 +0000, scole_mail wrote:
 
 > 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
 
 Nit pick: the .xcf file is made from .mrg, not .elf.  They are
 trivially different, but different.
 
 
 > 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
 
 This is after 3), right?
 
 
 > So I commented out the flags above, recompiled, and got the
 > .eh_frame* stuff back:
 [...]
 > 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..
 
 And that would be 4).
 
 
 BTW, you asked about the previous one (after 3):
 
 > Why does tsize=10000 ?
 
 Note, that .text 0xf6e0 + .eh_frame 0x920 = 0x10000 I'm not inferring
 anything, just pointing this out (note also that that previous one
 doesn't have .eh_frame :).
 
 
 
 > 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
 
 When I did 1), it was prompted by (relatively) huge ofwboot.xcf files.
 I accidentally still have one around and its size is 353486, which
 matches what I remember.  This is what I had in mind when asking about
 sizes.  I think sevan@ pointed that out to me, which prompted me to
 look at this in the first place.
 
 Hmm, I can't seem to reproduce this huge owfboot.xcf files anymore
 even undoing all the 1)-3) above...
 
 
 > 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?
 
 Yeah, confusing.  Would it be much trouble for you to try reverting to
 before 1) and trying that and then 1) to 4), doing cleandir before
 each iteration.  Maybe copying ofwboot objdir aside after each step
 for possible later forensics.
 
 TIA
 
 -uwe
 


Home | Main Index | Thread Index | Old Index