diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-06-22 21:13:24 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-06-22 21:13:24 +0000 |
commit | 7b9eea348fbba7b2fb103bf63e9e34973c1cddff (patch) | |
tree | 0dfb820909e32bfc382de756a8ae3832e5ee2520 /ld/ldlang.c | |
parent | 464e1740d2e1a1907ee35b2c47e205ed8f2e5583 (diff) | |
download | gdb-7b9eea348fbba7b2fb103bf63e9e34973c1cddff.zip gdb-7b9eea348fbba7b2fb103bf63e9e34973c1cddff.tar.gz gdb-7b9eea348fbba7b2fb103bf63e9e34973c1cddff.tar.bz2 |
* ldlang.c (section_already_linked): Only discard link once
sections if we are building constructors.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 862e4e2..d4c431c 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -890,6 +890,11 @@ section_already_linked (abfd, sec, data) return; } + /* If we aren't building constructors, don't discard link once + sections. Otherwise we can get confused when generating relocs. */ + if (! config.build_constructors) + return; + flags = bfd_get_section_flags (abfd, sec); if ((flags & SEC_LINK_ONCE) == 0) |