Checking for ELF header in existing binary parser [message #184644] |
Wed, 14 February 2007 09:36  |
Eclipse User |
|
|
|
Originally posted by: deliciap.cradle.com
Just put this on the cdt-dev group, but checking here too incase someone has
some inputs.
I have a toolchain (GNU toolchain ported for a different architecture) that
uses ELF format for binaries.
However, the current parsers in CDT don't recognize the binary.
Looking at the sources, org.eclipse.cdt.utils.elf.Elf.Attribute checks for
different fields of the ELF header.
For a start, I need to add to the switch-case for 'ehdr.e_machine', so that
it checks for my specific value.
What is the correct way to go about this? Is there some class I can
override?
Thanks,
Delicia.
|
|
|
Re: Checking for ELF header in existing binary parser [message #184694 is a reply to message #184644] |
Thu, 15 February 2007 03:04  |
Eclipse User |
|
|
|
Originally posted by: jesper.eskilson.se
Delicia wrote:
> Just put this on the cdt-dev group, but checking here too incase someone has
> some inputs.
>
>
> I have a toolchain (GNU toolchain ported for a different architecture) that
> uses ELF format for binaries.
> However, the current parsers in CDT don't recognize the binary.
>
> Looking at the sources, org.eclipse.cdt.utils.elf.Elf.Attribute checks for
> different fields of the ELF header.
> For a start, I need to add to the switch-case for 'ehdr.e_machine', so that
> it checks for my specific value.
> What is the correct way to go about this? Is there some class I can
> override?
Being in a similar position recently, I would guess that you need to
implement your own binary parser (i.e. the
org.eclipse.cdt.core.BinaryParser extension point), and inherit from the
existing Elf binary parser. You then add the binary parser to your
toolchain's "target platform" element.
--
/Jesper
|
|
|
Powered by
FUDForum. Page generated in 0.03763 seconds