From: Alan Modra Date: Wed, 10 Apr 2019 02:28:15 +0000 (+0930) Subject: cskyelf.em branch stub handling X-Git-Tag: binutils-2_33~1617 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53b81c6de19a1f89e3c797631e72d05ba41444dc;p=external%2Fbinutils.git cskyelf.em branch stub handling This fixes the csky-elf ld-elf/pr21884 and ld-unique/pr21529 failures, by disabling branch stubs for binary (and other non-csky) output. The csky-linux target gets branch stubs off by default because presumably there are reasons why branch stubs were disabled, but rather than killing the support completely it can be enabled by --branch-stub. * emultempl/cskyelf.em (csk_elf_before_parse): New function, setting use_branch_stub false for linux. (csky_elf_create_output_section_statements): Do emit this function and all others in the file for linux, plus the branch option control. Disable branch stubs when non-ELF. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 4df91b7..0f36d6c 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,13 @@ 2019-04-10 Alan Modra + * emultempl/cskyelf.em (csk_elf_before_parse): New function, + setting use_branch_stub false for linux. + (csky_elf_create_output_section_statements): Do emit this + function and all others in the file for linux, plus the branch + option control. Disable branch stubs when non-ELF. + +2019-04-10 Alan Modra + * Makefile.am (eskyelf.c, eskyelf_linux.c): Depend on cskyelf.em. (ecskyelf_linux.c): Depend on cskyelf.sh. (eelf32microblazeel.c): Depend on elf32microblaze.sh. diff --git a/ld/emultempl/cskyelf.em b/ld/emultempl/cskyelf.em index 690bb49..3651bb2 100644 --- a/ld/emultempl/cskyelf.em +++ b/ld/emultempl/cskyelf.em @@ -116,25 +116,32 @@ EOF case ${target} in csky-*-linux-*) fragment <the_bfd = bfd_create ("linker stubs", link_info.output_bfd); @@ -150,11 +157,7 @@ csky_elf_create_output_section_statements (void) stub_file->the_bfd->flags |= BFD_LINKER_CREATED; ldlang_add_file (stub_file); } -EOF - ;; -esac -fragment <