summaryrefslogtreecommitdiff
path: root/ld/emultempl/metagelf.em
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-04-22 05:25:25 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-04-22 05:25:25 -0700
commit4cbe42ea236bce32da4262f6f12328b58bac8f0f (patch)
tree53953e5797a50d9218a795544eca4f93d1f82746 /ld/emultempl/metagelf.em
parent6645479e9dc9470d22393d5bc4ef2ef2d391e848 (diff)
downloadbinutils-gdb-4cbe42ea236bce32da4262f6f12328b58bac8f0f.tar.gz
Add a fake bfd to hold linker created dynamic sectionsusers/hjl/dynobj
Currently, we hold linker created dynamic sections in an input shared object, which has its own dynamic sections, when the first input file from linker is a shared object. It may lead to conflicts between linker created dynamic sections and shared object's dynamic sections. We can use a a fake bfd to hold linker created dynamic sections. Unfortunately, it doesn't work due to BFD_LINKER_CREATED. Dynamic sections in bfd with BFD_LINKER_CREATED may be ignored.
Diffstat (limited to 'ld/emultempl/metagelf.em')
-rw-r--r--ld/emultempl/metagelf.em2
1 files changed, 2 insertions, 0 deletions
diff --git a/ld/emultempl/metagelf.em b/ld/emultempl/metagelf.em
index 5626ecad830..95900d70829 100644
--- a/ld/emultempl/metagelf.em
+++ b/ld/emultempl/metagelf.em
@@ -65,6 +65,8 @@ metagelf_create_output_section_statements (void)
stub_file->the_bfd->flags |= BFD_LINKER_CREATED;
ldlang_add_file (stub_file);
+
+ gld${EMULATION_NAME}_create_output_section_statements ();
}