gold patch committed: Add FreeBSD support
Ian Lance Taylor
iant@google.com
Tue Mar 24 00:34:00 GMT 2009
FreeBSD requires that the EI_OSABI byte in the e_ident field in the ELF
header of an executable be set to ELFOSABI_FREEBSD (aka 9). I committed
this patch to gold to implement that by adding a Target_freebsd class
which is the new parent class of Target_i386 and Target_x86_64. This
makes it trivial to add FreeBSD support to any target.
Ian
2009-03-23 Ian Lance Taylor <iant@google.com>
* freebsd.h: New file.
* i386.cc: Include "freebsd.h".
(Target_i386): Derive from Target_freebsd rather than
Sized_target.
(Target_selector_i386): Derive from Target_selector_freebsd rather
than Target_selector.
* x86_64.cc: Include "freebsd.h".
(Target_x86_64): Derive from Target_freebsd rather than
Sized_target.
(Target_selector_x86_64): Derive from Target_selector_freebsd
rather than Target_selector.
* target.h (class Target): Add adjust_elf_header and
do_adjust_elf_header.
* output.cc (Output_file_header:: do_sized_write): Call target
adjust_elf_header routine.
* configure.tgt: Set targ_osabi.
* configure.ac: Define GOLD_DEFAULT_OSABI.
* parameters.cc (Parameters::default_target): Pass
GOLD_DEFAULT_OSABI to select_target.
* target-select.h (class Target_selector): Make instantiate_target
protected rather than private.
* Makefile.am (HFILES): Add freebsd.h.
* configure, Makefile.in, config.in: Rebuild.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 15301 bytes
Desc: Add FreeBSD support
URL: <https://sourceware.org/pipermail/binutils/attachments/20090324/a17e5275/attachment.bin>
More information about the Binutils
mailing list