Hi H.J, Sorry for the delay; just got back from some time off. > -----Original Message----- > From: H.J. Lu > Sent: 22 July 2020 15:40 > To: Alex Coplan > Cc: Binutils > Subject: Re: [PATCH] gas: Fix internal error in S_SET_SEGMENT > > > gas/ChangeLog: > > > > 2020-07-22 Alex Coplan > > > > * config/obj-elf.c (obj_elf_change_section): When > > repurposing an existing symbol, ensure that we set sy_value as > > per other (fresh) section symbols. > > * testsuite/gas/aarch64/section-symbol-redef.d: New test. > > * testsuite/gas/aarch64/section-symbol-redef.s: Input for test. > > > > Why are tests arm specific? Can you put them to ELF tests? Thanks for pointing this out. I wasn't sure if there was a suitably-generic place for these to go, but it seems that the ELF test directory is the right place. See the updated patch attached. The test has been tweaked to fix the indentation for targets that assume anything in the first column is a label, and to skip on targets that either don't support assignment (bfin) or require attributes for sections (h8300). Is the updated version OK for master? Thanks, Alex --- gas/ChangeLog: 2020-08-03 Alex Coplan * config/obj-elf.c (obj_elf_change_section): When repurposing an existing symbol, ensure that we set sy_value as per other (fresh) section symbols. * testsuite/gas/elf/elf.exp: Add new test. * testsuite/gas/elf/section-symbol-redef.d: New test. * testsuite/gas/elf/section-symbol-redef.s: Input for test.