[PATCH/RFC] Add support for PEF, Mach-O, xSYM
Segher Boessenkool
segher@koffie.nl
Sat Oct 12 22:10:00 GMT 2002
Klee Dienes wrote:
>
> The following patch adds support for the PEF, Mach-O, and xSYM file
> formats.
Hi Klee, list,
I tried out your patch, and found a few bugs and have some suggestions.
xSYM:
* bfd_sym_object_p() doesn't clear abfd->tdata.sym_data; this leads
to crashes if binutils is autodetecting formats (I configure binutils
with --enable-targets=all; so I run into this).
PEF:
* Every section gets the same section flags now; but not every section
should have CODE and/or LOAD set. Maybe other such flags as well. This
is a nuissance if using objdump --disassemble, for example.
* architecture doesn't get set; it's in the PEF header bytes 8-11.
* All sections seem to have LMA == VMA; is this correct?
* I think the executable entry point doesn't get set.
* bfd_parse_function_stub() assumes all the transition vectors are in
one table, starting at offset 0. This is not true in general (I think it's
true for some compilers, but not for others).
* It would be useful to generate a label for the generic cross-module
call stub, as well (all files I've seen have it right after the "normal"
stubs; but its code pattern is just as recognizable as the normal stub
pattern, so better use that).
Mach-O:
Sorry, never used mach-o, so no comments :)
Thanks && have fun,
Segher
More information about the Binutils
mailing list