...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 (???)
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;