public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] dyn_relocs tidy
@ 2017-12-06  8:12 sergiodj+buildbot
  2017-12-06  8:12 ` Failures on Fedora-s390x-m64, branch master sergiodj+buildbot
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: sergiodj+buildbot @ 2017-12-06  8:12 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 3bf083ed23b1337341129b810ed5da29ba8207f9 ***

Author: Alan Modra <amodra@gmail.com>
Branch: master
Commit: 3bf083ed23b1337341129b810ed5da29ba8207f9

dyn_relocs tidy

Many targets define their own dyn_relocs struct when they could use
struct elf_dyn_relocs.  This patch tidies that, and uses
readonly_dynrelocs in a few more places.

The SH adjust_dynamic_symbol had some really weird code dating back to
2002 that looked over dynamic relocations for any in SEC_HAS_CONTENTS
or SEC_READONLY sections, rather than just the usual SEC_READONLY
sections.  So basically any dynamic relocation.  What's more, the SH
relocate_section has no support for emitting dynamic relocations in
non-PIC.  In other words, SH has no support for avoiding copy relocs
in non-PIC.  I've made that more obvious by using "if (0 && ..)" in
asjust_dynamic_symbol.

Unfortunately, LM32, M32R, NDS32, and OR1K copied the bogus SH
adjust_dynamic_symbol code.  So none of those targets would have
avoided copy relocs.  LM32, M32R, NDS32 get the "if (0)" treatment
too.  (LM32 is even more broken in that non_got_ref is never set.)

OR1K relocate_section looks like it might support dynamic relocs in
non-PIC, so I've enabled the copy reloc avoidance code for that
target.

	* elf32-hppa.c (struct elf32_hppa_dyn_reloc_entry): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(elf32_hppa_adjust_dynamic_symbol): Comment tidy.
	* elf32-lm32.c (struct elf_lm32_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(lm32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
	Disable -z no-copyreloc too.
	* elf32-m32r.c (struct elf_m32r_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(m32r_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
	Disable -z no-copyreloc too.
	* elf32-metag.c (struct elf_metag_dyn_reloc_entry): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(elf_metag_adjust_dynamic_symbol): Use readonly_dynrelocs.
	* elf32-microblaze.c (struct elf32_mb_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(readonly_dynrelocs): New function.
	(microblaze_elf_adjust_dynamic_symbol): Use it.
	* elf32-nds32.c (struct elf_nds32_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(nds32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
	Disable -z no-copyreloc too.
	* elf32-nios2.c (struct elf32_nios2_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	* elf32-or1k.c (struct elf_or1k_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(or1k_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
	* elf32-sh.c (struct elf_sh_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(sh_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
	Disable -z no-copyreloc too.
	* elf32-tilepro.c (struct tilepro_elf_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(tilepro_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
	* elfnn-riscv.c (struct riscv_elf_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(riscv_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
	* elfxx-sparc.c (struct _bfd_sparc_elf_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(_bfd_sparc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
	* elfxx-tilegx.c (struct tilegx_elf_dyn_relocs): Delete.  Use
	struct elf_dyn_relocs throughout file instead.
	(tilegx_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
	* elf32-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
	* elf64-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-12-06 19:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06  8:12 [binutils-gdb] dyn_relocs tidy sergiodj+buildbot
2017-12-06  8:12 ` Failures on Fedora-s390x-m64, branch master sergiodj+buildbot
2017-12-06 11:51 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2017-12-06 11:54 ` Failures on Fedora-i686, " sergiodj+buildbot
2017-12-06 12:08 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2017-12-06 12:09 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2017-12-06 12:26 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2017-12-06 12:30 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2017-12-06 14:55 ` Failures on Ubuntu-AArch64-m64, " sergiodj+buildbot
2017-12-06 18:19 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot
2017-12-06 18:46 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, " sergiodj+buildbot
2017-12-06 19:11 ` Failures on Ubuntu-AArch32-m32, " sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).