diff options
author | norly <ny-git@enpas.org> | 2013-01-28 02:21:35 +0000 |
---|---|---|
committer | norly <ny-git@enpas.org> | 2013-01-28 02:25:00 +0000 |
commit | 8307be70cdb15f97f3492d35f2c804766e43f415 (patch) | |
tree | 7f32f07e519ff2b55328fa4f670fb1c668743927 | |
parent | ff23dcf089d6df1e90450774d01b354fb7d82df5 (diff) |
Ugly section alignment fix
...until I figure out how to align entire sections.
The program runs, but the sections are slightly moved around and thus
the entry point cannot be right.
Seems this is because libelf loses some dynamic symbols (???)
-rw-r--r-- | src/copy/section.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/copy/section.c b/src/copy/section.c index 5a62593..e096b2b 100644 --- a/src/copy/section.c +++ b/src/copy/section.c @@ -57,7 +57,8 @@ void elfu_copySection(Elf *eo, Elf_Scn *scn) fprintf(stderr, "elf_newdata() failed: %s\n", elf_errmsg(-1)); } - dataOut->d_align = data->d_align; + //dataOut->d_align = data->d_align; + dataOut->d_align = shdr.sh_addralign; dataOut->d_buf = data->d_buf; /* dataOut->d_off = data->d_off; */ dataOut->d_type = data->d_type; |