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:
52a3fbd
)
outmacho.c: fix section/relocation alignment issue
author
Keith Kanios
<keith@kanios.net>
Wed, 8 Jul 2009 04:09:22 +0000
(23:09 -0500)
committer
Keith Kanios
<keith@kanios.net>
Wed, 8 Jul 2009 04:09:22 +0000
(23:09 -0500)
output/outmacho.c
patch
|
blob
|
history
diff --git
a/output/outmacho.c
b/output/outmacho.c
index
aeed319
..
7e2f0fb
100644
(file)
--- a/
output/outmacho.c
+++ b/
output/outmacho.c
@@
-1020,9
+1020,13
@@
static void macho_write_section (void)
of the rest of the address. */
if (!r->ext) {
/* generate final address by section address and offset */
- for (s2 = sects, fi = 1;
- s2 != NULL && fi < r->snum; s2 = s2->next, fi++)
- l += s2->size;
+ for (s2 = sects, fi = 1;
+ s2 != NULL; s2 = s2->next, fi++){
+ if(fi == r->snum){
+ l += s2->addr;
+ break;
+ }
+ }
}
/* write new offset back */