This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Explain what happens for PE targeted linkers in the case where the user actually tries to provide __
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 7 Aug 2018 07:46:44 -0000
- Subject: [binutils-gdb] Explain what happens for PE targeted linkers in the case where the user actually tries to provide __
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=99f8774ccaca5b1bfa4a035c6c705bc7ef47e75f
commit 99f8774ccaca5b1bfa4a035c6c705bc7ef47e75f
Author: Martin Storsjo <martin@martin.st>
Date: Tue Aug 7 08:45:14 2018 +0100
Explain what happens for PE targeted linkers in the case where the user actually tries to provide __CTOR_LIST__ and/or __DTOR_LIST__ symbols.
* scripttempl/pe.sc: Improve the comment about overriding
__CTOR_LIST__ and __DTOR_LIST__ symbols.
* scripttemp/pep.sc: Likewise.
Diff:
---
ld/ChangeLog | 6 ++++++
ld/scripttempl/pe.sc | 10 ++++++----
ld/scripttempl/pep.sc | 10 ++++++----
3 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 99a4f7e..98af468 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2018-08-07 Martin Storsjo <martin@martin.st>
+
+ * scripttempl/pe.sc: Improve the comment about overriding
+ __CTOR_LIST__ and __DTOR_LIST__ symbols.
+ * scripttemp/pep.sc: Likewise.
+
2018-08-07 Nick Clifton <nickc@redhat.com>
* po/bg.po: Updated Bulgarian translation.
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc
index f56d783..8fdeaff 100644
--- a/ld/scripttempl/pe.sc
+++ b/ld/scripttempl/pe.sc
@@ -106,10 +106,12 @@ SECTIONS
overridden and global constructors will not be run.
This does mean that it is not possible for a user to define
- their own __CTOR_LIST__ and __DTOR_LIST__ symbols. If that
- ability is needed a custom linker script will have to be
- used. (The custom script can just be a copy of this script
- with the PROVIDE() qualifiers added).
+ their own __CTOR_LIST__ and __DTOR_LIST__ symbols; if they do,
+ the content from those variables are included but the symbols
+ defined here silently take precedence. If they truly need to
+ be redefined, a custom linker script will have to be used.
+ (The custom script can just be a copy of this script with the
+ PROVIDE() qualifiers added).
See PR 22762 for more details. */
___CTOR_LIST__ = .;
diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc
index 3c6c84d..a7157dc 100644
--- a/ld/scripttempl/pep.sc
+++ b/ld/scripttempl/pep.sc
@@ -107,10 +107,12 @@ SECTIONS
overridden and global constructors will not be run.
This does mean that it is not possible for a user to define
- their own __CTOR_LIST__ and __DTOR_LIST__ symbols. If that
- ability is needed a custom linker script will have to be
- used. (The custom script can just be a copy of this script
- with the PROVIDE() qualifiers added).
+ their own __CTOR_LIST__ and __DTOR_LIST__ symbols; if they do,
+ the content from those variables are included but the symbols
+ defined here silently take precedence. If they truly need to
+ be redefined, a custom linker script will have to be used.
+ (The custom script can just be a copy of this script with the
+ PROVIDE() qualifiers added).
See PR 22762 for more details. */
___CTOR_LIST__ = .;