record Xtensa configuration info in ELF files

Bob Wilson bwilson@tensilica.com
Mon Nov 27 20:16:00 GMT 2006


Add a new .xtensa.info note section to ELF files generated by GAS and LD to 
record some Xtensa configuration information, currently the ABI and the Extended 
L32R option.  The linker uses this information to check for incompatible files 
being linked together.  I had to add a new expected output file for the 
gas/elf/section2 test, but with that change, all the tests pass.  Committed on 
the mainline.

bfd/
	* elf32-xtensa.c (elf_xtensa_special_sections): Add .xtensa.info.

gas/
	* config/tc-xtensa.c (XSHAL_ABI): Add default definition.
	(directive_state): Disable scheduling by default.
	(xtensa_add_config_info): New.
	(xtensa_end): Call xtensa_add_config_info.

gas/testsuite/
	* gas/elf/section2.e-xtensa: New file.
	* gas/elf/elf.exp: Use it.

include/
	* xtensa-config.h (XSHAL_ABI): New.
	(XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New.

ld/
	* emultempl/xtensaelf.em (XSHAL_ABI): Add default definition.
	(replace_insn_sec_with_prop_sec): Use bfd_make_section_with_flags.
	Delete redundant code to set sections flags and alignment.
	(xt_config_info_unpack_and_check, check_xtensa_info): New.
	(elf_xtensa_after_open): Iterate over input statements instead of
	link_info.input_bfds.
	(elf_xtensa_before_allocation): Likewise.  Call check_xtensa_info for
	each input, and write a new .xtensa.info section in the output.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xtensa-info.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20061127/c5c5067c/attachment.ksh>


More information about the Binutils mailing list