projects
/
platform
/
upstream
/
nasm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82e9499
)
Adjust symbol number for global symbols
author
Charles Crayne
<chuck@thor.crayne.org>
Tue, 4 Mar 2008 22:25:34 +0000
(14:25 -0800)
committer
Charles Crayne
<chuck@thor.crayne.org>
Tue, 4 Mar 2008 22:25:34 +0000
(14:25 -0800)
Reloc entries were pointing to wrong target section
output/outelf32.c
patch
|
blob
|
history
diff --git
a/output/outelf32.c
b/output/outelf32.c
index
a11b0b2
..
6ba3169
100644
(file)
--- a/
output/outelf32.c
+++ b/
output/outelf32.c
@@
-1414,7
+1414,11
@@
static struct SAA *elf_build_reltab(int32_t *len, struct Reloc *r)
int32_t sym = r->symbol;
if (sym >= GLOBAL_TEMP_BASE)
- sym += -GLOBAL_TEMP_BASE + (nsects + 2) + nlocals;
+ {
+ if (of_elf32.current_dfmt == &df_dwarf)
+ sym += -GLOBAL_TEMP_BASE + (nsects + 5) + nlocals;
+ else sym += -GLOBAL_TEMP_BASE + (nsects + 2) + nlocals;
+ }
p = entry;
WRITELONG(p, r->address);