Bug 3374 - fcore core files are 64bit on a 32 bit platform
Summary: fcore core files are 64bit on a 32 bit platform
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Phil Muldoon
URL:
Keywords:
Depends on:
Blocks: 2243
  Show dependency treegraph
 
Reported: 2006-10-17 19:39 UTC by Phil Muldoon
Modified: 2006-10-18 18:24 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Muldoon 2006-10-17 19:39:25 UTC
elf_begin is correctly called

gelf_newehdr(elf,gelf_getclass(elf)) might be incorrectly used as elf does not
know its own wordsize yet, so it may be returning 64bit always. We might have to
manually override the gelf_getclass() call and provide our own wordsize indicator
Comment 1 Phil Muldoon 2006-10-18 15:37:14 UTC
As suspected, using gelf_getclass() on an empty structure won't work (or
magically know what arch size you are on). When creating the Elf Header (and
only the Elf Header) with gelf a class has to be specified regarding ELFCLASS32
or ELFCLASS64. We can derive from wordsize which correct value to give to gelf
for initial header generation.

2006-10-17  Phil Muldoon  <pmuldoon@redhat.com>

        * Elf.java (createNewEHeader): Require a wordsize.

        * cni/Elf.cxx (elf_newehdr): Specify wordsize.
        gelf_getclass() for wordsize won't work on an empty elf struct.