This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH/RFC] Add support for PEF, Mach-O, xSYM
- From: Segher Boessenkool <segher at koffie dot nl>
- To: Klee Dienes <klee at apple dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Sun, 13 Oct 2002 06:47:12 +0200
- Subject: Re: [PATCH/RFC] Add support for PEF, Mach-O, xSYM
- References: <6A312E08-DCF8-11D6-ABDA-00039396EEB8@apple.com>
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