diff options
author | Peng Fan <van.freenix@gmail.com> | 2013-08-24 18:19:15 +0800 |
---|---|---|
committer | Peng Fan <van.freenix@gmail.com> | 2013-08-29 19:42:33 +0800 |
commit | 10adaf5457e38794c8005afa13d919e77a534efa (patch) | |
tree | fd4ea9e8d4320f24b6c714f29688df1a56745d41 | |
parent | 4f7bb2dfed857ab44e87bf015d756cfc0be1b86f (diff) |
Ignore common section and null(index 0) section
Signed-off-by: Peng Fan <van.freenix@gmail.com>
-rw-r--r-- | rld-rap.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rld-rap.cpp b/rld-rap.cpp index f54f7f3..500c2c3 100644 --- a/rld-rap.cpp +++ b/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; |