X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Femultempl%2Fcskyelf.em;h=e84ddb68dbdc1fbd7861ba44125050a8a4367420;hb=a78a19b15254de31c3d38b7e27469aaef0a30e97;hp=3651bb244d665c51019bfd0948494d5d03b56edd;hpb=53b81c6de19a1f89e3c797631e72d05ba41444dc;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/emultempl/cskyelf.em b/ld/emultempl/cskyelf.em index 3651bb244d..e84ddb68db 100644 --- a/ld/emultempl/cskyelf.em +++ b/ld/emultempl/cskyelf.em @@ -1,5 +1,5 @@ # This shell script emits a C file. -*- C -*- -# Copyright (C) 2013-2019 Free Software Foundation, Inc. +# Copyright (C) 2013-2020 Free Software Foundation, Inc. # # This file is part of GNU Binutils. # @@ -18,13 +18,14 @@ # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, # MA 02110-1301, USA. -# This file is sourced from elf32.em, and defines extra C-SKY ELF +# This file is sourced from elf.em, and defines extra C-SKY ELF # specific routines. # fragment <the_bfd, stub_sec, 3); + bfd_set_section_alignment (stub_sec, 3); output_section = input_section->output_section; - secname = bfd_get_section_name (output_section->owner, output_section); + secname = bfd_section_name (output_section); os = lang_output_section_find (secname); info.input_section = input_section; @@ -196,7 +197,7 @@ elf32_csky_add_stub_section (const char *stub_sec_name, if (hook_in_stub (&info, &os->children.head)) return stub_sec; -err_ret: + err_ret: einfo (_("%X%P: can not make stub section: %E\n")); return NULL; } @@ -208,7 +209,7 @@ gldcsky_layout_sections_again (void) /* If we have changed sizes of the stub sections, then we need to recalculate all the section offsets. This may mean we need to add even more stubs. */ - gld${EMULATION_NAME}_map_segments (TRUE); + ldelf_map_segments (TRUE); need_laying_out = -1; } @@ -269,7 +270,7 @@ gld${EMULATION_NAME}_after_allocation (void) } if (need_laying_out != -1) - gld${EMULATION_NAME}_map_segments (need_laying_out); + ldelf_map_segments (need_laying_out); } static void @@ -283,26 +284,6 @@ gld${EMULATION_NAME}_finish (void) finish_default (); } -/* Avoid processing the fake stub_file in vercheck, stat_needed and - check_needed routines. */ - -static void (*real_func) (lang_input_statement_type *); - -static void csky_for_each_input_file_wrapper (lang_input_statement_type *l) -{ - if (l != stub_file) - (*real_func) (l); -} - -static void -csky_lang_for_each_input_file (void (*func) (lang_input_statement_type *)) -{ - real_func = func; - lang_for_each_input_file (&csky_for_each_input_file_wrapper); -} - -#define lang_for_each_input_file csky_lang_for_each_input_file - EOF # This code gets inserted into the generic elf32.sc linker script