binutils-gdb/gas/config
Max Filippov d0ad159d68 gas: xtensa: fix literal movement
Not all literals need to be moved in the presence of
--text-section-literals or --auto-litpools, but only those created by
.literal pseudo op or generated as a result of relaxation. Attempts to
move other literals may result in abnormal termination of the assembler
due to the following assertion failure:

  Internal error in xg_find_litpool at gas/config/tc-xtensa.c:11209.

The same assertion may also be triggered by attempting to assign literal
pools to literals in .init and .fini sections; don't try to do that.

gas/
2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>

	* config/tc-xtensa.c (xtensa_is_init_fini): New function.
	(xtensa_move_literals): Only attempt to assign literal pool to
	literals with tc_frag_data.is_literal mark and not in .init or
	.fini sections.
	Join nested 'if' conditions to simplify function structure.
	(xtensa_switch_to_non_abs_literal_fragment): Use
	xtensa_is_init_fini to test for .init/.fini sections.
	* testsuite/gas/xtensa/all.exp (auto-litpools-3)
	(auto-litpools-4, text-section-literals-1): New tests.
	* testsuite/gas/xtensa/auto-litpools-3.d: New test results.
	* testsuite/gas/xtensa/auto-litpools-3.s: New test source.
	* testsuite/gas/xtensa/auto-litpools-4.d: New test results.
	* testsuite/gas/xtensa/auto-litpools-4.s: New test source.
	* testsuite/gas/xtensa/text-section-literals-1.d: New test results.
	* testsuite/gas/xtensa/text-section-literals-1.s: New test source.
2018-05-09 12:44:08 -07:00
..
atof-ieee.c
atof-vax.c
bfin-aux.h
bfin-defs.h
bfin-lex-wrapper.c
bfin-lex.l
bfin-parse.y
e-crisaout.c
e-criself.c
e-i386aout.c
e-i386coff.c
e-i386elf.c
e-mipself.c
itbl-mips.h
m68k-parse.h
m68k-parse.y
obj-aout.c
obj-aout.h
obj-coff-seh.c
obj-coff-seh.h
obj-coff.c
obj-coff.h Remove sparc-aout and sparc-coff support 2018-04-16 15:33:26 +09:30
obj-ecoff.c
obj-ecoff.h
obj-elf.c various i386-aout and i386-coff target removal 2018-04-18 09:34:19 +09:30
obj-elf.h Fix compile time warning messages from gcc version 8 about cast between incompatible function types. 2018-02-13 13:14:47 +00:00
obj-evax.c -Wstringop-truncation warnings 2018-05-04 18:58:23 +09:30
obj-evax.h
obj-fdpicelf.c
obj-fdpicelf.h
obj-macho.c -Wstringop-truncation warnings 2018-05-04 18:58:23 +09:30
obj-macho.h
obj-multi.c
obj-multi.h
obj-som.c
obj-som.h
rl78-defs.h
rl78-parse.y
rx-defs.h
rx-parse.y
tc-aarch64.c [1/2][GAS][AARCH64]Add BFD_RELOC_AARCH64_TLSLE_LDST8/16/32/64_TPREL_LO12 support in GAS. 2018-03-28 18:03:55 +01:00
tc-aarch64.h
tc-alpha.c
tc-alpha.h
tc-arc.c
tc-arc.h
tc-arm.c [ARM] Add TLS relocations for FDPIC. 2018-04-25 20:57:02 +00:00
tc-arm.h Remove arm-aout and arm-coff support 2018-04-25 09:38:17 +09:30
tc-avr.c
tc-avr.h
tc-bfin.c
tc-bfin.h
tc-cr16.c Silence gcc-8 warnings 2018-04-23 18:10:41 +09:30
tc-cr16.h
tc-cris.c
tc-cris.h
tc-crx.c Silence gcc-8 warnings 2018-04-23 18:10:41 +09:30
tc-crx.h
tc-d10v.c
tc-d10v.h
tc-d30v.c
tc-d30v.h
tc-dlx.c
tc-dlx.h
tc-epiphany.c
tc-epiphany.h
tc-fr30.c
tc-fr30.h
tc-frv.c
tc-frv.h
tc-ft32.c
tc-ft32.h
tc-generic.c
tc-generic.h
tc-h8300.c Remove h8300-coff support 2018-04-16 15:17:57 +09:30
tc-h8300.h Remove h8300-coff support 2018-04-16 15:17:57 +09:30
tc-hppa.c Fix compile time warning messages from gcc version 8 about cast between incompatible function types. 2018-02-13 13:14:47 +00:00
tc-hppa.h
tc-i386-intel.c x86: drop {X,Y,Z}MMWORD_MNEM_SUFFIX 2018-03-08 08:52:27 +01:00
tc-i386.c Enable Intel MOVDIRI, MOVDIR64B instructions 2018-05-07 16:57:48 -07:00
tc-i386.h various i386-aout and i386-coff target removal 2018-04-18 09:34:19 +09:30
tc-ia64.c
tc-ia64.h
tc-ip2k.c
tc-ip2k.h
tc-iq2000.c
tc-iq2000.h
tc-lm32.c
tc-lm32.h
tc-m32c.c
tc-m32c.h
tc-m32r.c
tc-m32r.h
tc-m68hc11.c
tc-m68hc11.h
tc-m68k.c Remove m68k-aout and m68k-coff support 2018-04-16 15:31:36 +09:30
tc-m68k.h Remove m68k-aout and m68k-coff support 2018-04-16 15:31:36 +09:30
tc-m68851.h
tc-mcore.c
tc-mcore.h
tc-mep.c
tc-mep.h
tc-metag.c
tc-metag.h
tc-microblaze.c [MicroBlaze] PIC data text relative 2018-04-17 14:47:13 -07:00
tc-microblaze.h
tc-mips.c Fix memory access violation when attempting to shorten a suffixed micromips instruction during lookup. 2018-02-22 12:49:49 +00:00
tc-mips.h
tc-mmix.c
tc-mmix.h
tc-mn10200.c
tc-mn10200.h
tc-mn10300.c
tc-mn10300.h
tc-moxie.c
tc-moxie.h
tc-msp430.c
tc-msp430.h
tc-mt.c
tc-mt.h
tc-nds32.c nds32: Support target directive .ict_model. 2018-02-23 14:27:13 +08:00
tc-nds32.h
tc-nios2.c
tc-nios2.h
tc-ns32k.c
tc-ns32k.h
tc-or1k.c
tc-or1k.h
tc-pdp11.c
tc-pdp11.h
tc-pj.c
tc-pj.h
tc-ppc.c Cleanup ppc code dealing with opcode dumps. 2018-05-07 09:40:59 -05:00
tc-ppc.h
tc-pru.c Fix binary compatibility between GCC and the TI compiler for the PRU target. 2018-05-09 11:39:32 +01:00
tc-pru.h
tc-riscv.c RISC-V: Add new option -mrelax/-mno-relax. 2018-04-20 15:30:18 -07:00
tc-riscv.h
tc-rl78.c
tc-rl78.h
tc-rx.c
tc-rx.h
tc-s390.c
tc-s390.h
tc-score7.c Remove i860, i960, bout and aout-adobe targets 2018-04-11 21:49:30 +09:30
tc-score.c Remove i860, i960, bout and aout-adobe targets 2018-04-11 21:49:30 +09:30
tc-score.h
tc-sh.c Remove sh5 and sh64 support 2018-04-16 15:29:39 +09:30
tc-sh.h Remove sh-symbianelf support 2018-04-16 15:27:45 +09:30
tc-sparc.c Remove sparc-aout and sparc-coff support 2018-04-16 15:33:26 +09:30
tc-sparc.h Remove sparc-aout and sparc-coff support 2018-04-16 15:33:26 +09:30
tc-spu.c
tc-spu.h
tc-tic4x.c
tc-tic4x.h
tc-tic6x.c
tc-tic6x.h
tc-tic30.c
tc-tic30.h
tc-tic54x.c
tc-tic54x.h
tc-tilegx.c
tc-tilegx.h
tc-tilepro.c
tc-tilepro.h
tc-v850.c
tc-v850.h
tc-vax.c
tc-vax.h
tc-visium.c
tc-visium.h
tc-wasm32.c
tc-wasm32.h
tc-xc16x.c
tc-xc16x.h
tc-xgate.c
tc-xgate.h
tc-xstormy16.c
tc-xstormy16.h
tc-xtensa.c gas: xtensa: fix literal movement 2018-05-09 12:44:08 -07:00
tc-xtensa.h
tc-z8k.c
tc-z8k.h
tc-z80.c
tc-z80.h
te-386bsd.h
te-aix5.h
te-aix.h
te-armeabi.h
te-armfbsdeabi.h
te-armfbsdvfp.h
te-armlinuxeabi.h
te-dragonfly.h
te-freebsd.h
te-generic.h
te-gnu.h
te-go32.h
te-hppa64.h
te-hppa.h
te-hppalinux64.h
te-hpux.h
te-ia64aix.h
te-interix.h
te-irix.h
te-linux.h
te-lynx.h
te-macos.h
te-nacl.h
te-nbsd532.h
te-nbsd.h
te-pc532mach.h
te-pe.h
te-pep.h
te-solaris.h
te-svr4.h
te-symbian.h
te-tmips.h
te-uclinux.h
te-vms.c
te-vms.h
te-vxworks.h
te-wince-pe.h
vax-inst.h
xtensa-istack.h
xtensa-relax.c
xtensa-relax.h