fix missing Xtensa literal table entries

Bob Wilson bwilson@tensilica.com
Sat Mar 20 13:27:00 GMT 2004


Xtensa ELF files contain a special ".xt.lit" section to record the position of 
literals.  The literals for the .init and .fini sections, which are placed in 
.init.literal and .fini.literal respectively, were not being included in the 
table.  This problem was discovered because one effect of this bug is that the 
DT_TEXTREL flag is incorrectly set for glibc.  (There's also a serious design 
problem with setting DT_TEXTREL for Xtensa; more on that later....)

I've tested the patch by running the GAS testsuite with an xtensa-linux-gnu 
target and by building glibc and booting a board with it.  Committed on the 
mainline and 2.15 branch.


2004-03-19  Bob Wilson  <bob.wilson@acm.org>

	* config/tc-xtensa.c (mark_literal_frags): New function.
	(xtensa_move_literals): Call mark_literal_frags for all literal
	segments, including init and fini literal segments.
	(xtensa_post_relax_hook): Swap use of xt_insn_sec and xt_literal_sec.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gas-lit.diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20040320/1b57d7fc/attachment.ksh>


More information about the Binutils mailing list