summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <van.freenix@gmail.com>2013-08-24 18:19:15 +0800
committerPeng Fan <van.freenix@gmail.com>2013-08-29 19:42:33 +0800
commit64309e0b782526d01895dc5fa7d90a8de86eac2d (patch)
tree326c8822f3b28f733fbc5dc0aa128615de929cc8
parent37a7a7c92fa1a758db764a3481593e6c6b608137 (diff)
Ignore common section and null(index 0) section
Signed-off-by: Peng Fan <van.freenix@gmail.com>
-rw-r--r--linkers/rld-rap.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/linkers/rld-rap.cpp b/linkers/rld-rap.cpp
index f54f7f3..500c2c3 100644
--- a/linkers/rld-rap.cpp
+++ b/linkers/rld-rap.cpp
@@ -1015,6 +1015,14 @@ namespace rld
if ((sym.binding () == STB_GLOBAL) || (sym.binding () == STB_WEAK))
{
int symsec = sym.section_index ();
+
+ /* Ignore section index 0 */
+ if (symsec == 0)
+ continue;
+ /* Ignore sparc common section */
+ if ((elf::object_machine_type () == EM_SPARC) && (symsec == 65522))
+ continue;
+
sections rap_sec = obj.find (symsec);
section& sec = obj.secs[rap_sec];
std::size_t name;