This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/RFA] Allow merging read-only sections into .text on a.out


The following patch allows read-only sections to be merged with .text
by the a.out back-end.  I need it in order for objcopy of arm-netbsdelf
to arm-netbsd (a.out) to function properly -- the ARM OpenFirmware bindings
only specify a.out (with the NetBSD ZMAGIC magic number), and there are a
bunch of machines deployed who's firmware only eat a.out binaries.

The problem is once again with C-referenceable sections (the "link sets"
I referred to in the previous thread about the linker).  They are being
sorted into .text (per my previous patch) in this case, but still have
their own sections, and the a.out back-end does not know how to represent
them in the output file.

OK for mainline?  OK for 2.13 branch?

	* aoutx.h (set_section_contents): Allow an otherwise unrepresentable
	read-only section that lies after .text and before .data to be
	written into the output file and included in a_text.
	(translate_to_native_sym_flags): If an otherwise unrepresentable
	section was merged with .text, convert its symbols to N_TEXT
	symbols.
	* libaout.h (aout_section_merge_with_text_p): New macro.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

Attachment: aout-merge-patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]