record Xtensa configuration info in ELF files

Bob Wilson
Mon Nov 27 20:16:00 GMT 2006

Add a new 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.

	* elf32-xtensa.c (elf_xtensa_special_sections): Add

	* 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/elf/section2.e-xtensa: New file.
	* gas/elf/elf.exp: Use it.

	* xtensa-config.h (XSHAL_ABI): New.

	* 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
	(elf_xtensa_before_allocation): Likewise.  Call check_xtensa_info for
	each input, and write a new section in the output.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xtensa-info.patch
URL: <>

More information about the Binutils mailing list