aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2019-07-02 14:14:13 +0100
committerNick Clifton <nickc@redhat.com>2019-07-02 14:14:13 +0100
commit125f83f66c10c89530d011f4f81324b1f43afcda (patch)
treefbe8efe47110bf9b0c6a07a225839ac3cf83d197 /ld
parent163b2c58bdbf0cba9a085574ae88d4c757c6567d (diff)
downloadgdb-125f83f66c10c89530d011f4f81324b1f43afcda.zip
gdb-125f83f66c10c89530d011f4f81324b1f43afcda.tar.gz
gdb-125f83f66c10c89530d011f4f81324b1f43afcda.tar.bz2
Fix a bug recently introduced to the linker where it would complain about a section being larger than a file, even if the section was artificial.
PR 24753 bfd * compress.c (bfd_get_full_section_contents): Do not complain about linker created sections that are larger than the file size. ld * emultempl/aarch64elf.em (_aarch64_add_stub_section): Include the LINKER_CREATED section flag when creating the stub section.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/emultempl/aarch64elf.em2
2 files changed, 7 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 0f06196..d4916f4 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2019-07-02 Nick Clifton <nickc@redhat.com>
+
+ PR 24753
+ * emultempl/aarch64elf.em (_aarch64_add_stub_section): Include the
+ LINKER_CREATED section flag when creating the stub section.
+
2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
* testsuite/ld-arm/arm-elf.exp: Add tests.
diff --git a/ld/emultempl/aarch64elf.em b/ld/emultempl/aarch64elf.em
index 4c13f26..93f60a9 100644
--- a/ld/emultempl/aarch64elf.em
+++ b/ld/emultempl/aarch64elf.em
@@ -169,7 +169,7 @@ elf${ELFSIZE}_aarch64_add_stub_section (const char *stub_sec_name,
lang_output_section_statement_type *os;
struct hook_stub_info info;
- flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE | SEC_LINKER_CREATED
| SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
stub_sec = bfd_make_section_anyway_with_flags (stub_file->the_bfd,
stub_sec_name, flags);