binutils-gdb/ld/testsuite
Alan Modra 27cdfa03b5 m32c padding with nops
m32c_md_end attempted to pad out a code section with nops, but this
was just plain wrong in many ways:
- The padding didn't happen at all if the last section emitted wasn't
  a code section.
- The padding went to the wrong place if subsections were used, and
  the last subseg used wasn't the highest numbered subseg.
- Padding wasn't added to all code sections.
- If the last section was empty, it was padded to 4 bytes.
- The padding didn't go to a 4-byte alignment boundary, instead it
  effectively made the last instruction 4 bytes in size.
- The padding didn't take into account that code sections may have
  contents other than machine instructions.

So, rip it out and handle nop padding properly, also fixing .align
.balign/.p2align in the middle of code.

gas/
	* config/tc-m32c.c (insn_size): Delete static var.
	(md_begin): Don't set it.
	(m32c_md_end): Delete.
	(md_assemble): Add insn_size auto var.
	* config/tc-m32c.h (md_end): Don't define.
	(m32c_md_end): Delete.
	(NOP_OPCODE, HANDLE_ALIGN, MAX_MEM_FOR_RS_ALIGN_CODE): Define.
	* testsuite/gas/all/align.d: Remove m32c from notarget list.
	* testsuite/gas/all/incbin.d: Likewise.
	* testsuite/gas/elf/dwarf2-11.d: Likewise.
	* testsuite/gas/macros/semi.d: Likewise.
	* testsuite/gas/all/gas.exp (do_comment): Similarly.
ld/
	* testsuite/ld-scripts/fill.d: Don't xfail m32c
	* testsuite/ld-scripts/fill16.d: Likewise.
2019-05-04 17:23:18 +09:30
..
config Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-aarch64 [BFD, AArch64] Improve bti/pac plts. 2019-04-25 11:37:25 +01:00
ld-alpha
ld-arc
ld-arm [binutils, ARM, 11/16] New BFCSEL instruction for Armv8.1-M Mainline 2019-04-15 12:31:42 +01:00
ld-auto-import Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-avr
ld-bootstrap
ld-cdtest
ld-checks
ld-cris
ld-crx
ld-csky
ld-cygwin Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-d10v
ld-discard
ld-elf PR24511, nm should not mark symbols in .init_array as "t" 2019-05-04 16:57:33 +09:30
ld-elfcomm Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-elfvers Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-elfvsb Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-elfweak Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-fastcall
ld-frv
ld-gc Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-h8300
ld-i386 Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-ia64
ld-ifunc Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-libs
ld-linkonce
ld-m68hc11
ld-m68k
ld-mep
ld-metag
ld-mips-elf Fix M5100 flags test with interAptiv-MR2 2019-04-22 20:41:03 -07:00
ld-misc
ld-mmix
ld-mn10300 Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-msp430-elf MSP430 Linker: Define __crt0_init_bss/__crt0_movedata symbols when .lower or .either prefixed sections are present. 2019-04-17 15:05:08 +01:00
ld-nds32
ld-nios2
ld-or1k
ld-pe Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-pie Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-plugin Don't complain undefined weak dynamic reference 2019-04-26 07:52:09 -07:00
ld-powerpc PowerPC64 GOT indirect to GOT relative optimisation 2019-04-30 22:09:54 +09:30
ld-pru
ld-riscv-elf
ld-s12z
ld-s390
ld-scripts m32c padding with nops 2019-05-04 17:23:18 +09:30
ld-selective
ld-sh Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-shared Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-size Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-sparc
ld-spu
ld-srec Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-tic6x
ld-tilegx
ld-tilepro
ld-undefined Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-unique Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-v850
ld-vax-elf
ld-visium
ld-vxworks
ld-x86-64 Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-xc16x
ld-xstormy16
ld-xtensa
ld-z8k
lib Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-9303