diff options
author | Peng Fan <van.freenix@gmail.com> | 2013-07-18 10:49:09 +0800 |
---|---|---|
committer | Peng Fan <van.freenix@gmail.com> | 2013-07-19 07:34:14 +0800 |
commit | 2a5f817cb9202efbaa83c2b6e9808882580fa5d1 (patch) | |
tree | 1f053023ccf1b97a02cdf31c56df856036bded6a | |
parent | d2ef368d664bf03e702ff7f17577f3081b909970 (diff) |
Fixed layout problem
Fixed when only one elf object file is passed to rtems-ld.And fixed the error when
one object file has rela relocation records, but the other does not contain relocation
records.
Signed-off-by: Peng Fan <van.freenix@gmail.com>
-rw-r--r-- | rld-rap.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/rld-rap.cpp b/rld-rap.cpp index 8b3bbcb..590d31e 100644 --- a/rld-rap.cpp +++ b/rld-rap.cpp @@ -882,10 +882,21 @@ namespace rld obj.secs[s].set_offset (pobj.secs[s]); sec_size[s] = obj.secs[s].offset + obj.secs[s].size (); sec_align[s] = obj.secs[s].alignment (); - sec_rela[s] = obj.secs[s].rela; + if (obj.secs[s].rela == true) + sec_rela[s] = obj.secs[s].rela; } ++poi; } + else + { + for (int s = 0; s < rap_secs; ++s) + { + sec_size[s] = obj.secs[s].size (); + sec_align[s] = obj.secs[s].alignment (); + if (obj.secs[s].rela == true) + sec_rela[s] = true; + } + } collect_symbols (obj); |