diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-02-19 01:02:50 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-02-19 21:56:59 -0500 |
commit | 6afc6f8fbbed5da90893da1865e003d911cc89eb (patch) | |
tree | 62030327e088a9a35e3c7920a42a1fa539159b45 /src/post.c | |
parent | 89a2f96de451d2dd4ea887b41c5425b051c93f8b (diff) | |
download | seabios-6afc6f8fbbed5da90893da1865e003d911cc89eb.tar.gz |
Don't relocate "varlow" variable references at runtime.
Since the final location of the "varlow" variables are known at build
time, link the final locations into the binary during the build. The
16bit code was already done at link time - update the build so the
32bit code is also done at link time.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/post.c')
-rw-r--r-- | src/post.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -105,7 +105,7 @@ void interface_init(void) { // Running at new code address - do code relocation fixups - malloc_fixupreloc_init(); + malloc_init(); // Setup romfile items. qemu_cfg_init(); @@ -264,8 +264,6 @@ reloc_preinit(void *f, void *arg) extern u32 _reloc_rel_start[], _reloc_rel_end[]; extern u32 _reloc_init_start[], _reloc_init_end[]; extern u8 code32init_start[], code32init_end[]; - extern u32 _reloc_varlow_start[], _reloc_varlow_end[]; - extern u8 varlow_start[], varlow_end[], final_varlow_start[]; // Allocate space for init code. u32 initsize = code32init_end - code32init_start; @@ -275,10 +273,6 @@ reloc_preinit(void *f, void *arg) panic("No space for init relocation.\n"); // Copy code and update relocs (init absolute, init relative, and runtime) - dprintf(1, "Relocating low data from %p to %p (size %d)\n" - , varlow_start, final_varlow_start, varlow_end - varlow_start); - updateRelocs(code32flat_start, _reloc_varlow_start, _reloc_varlow_end - , final_varlow_start - varlow_start); dprintf(1, "Relocating init from %p to %p (size %d)\n" , code32init_start, codedest, initsize); s32 delta = codedest - (void*)code32init_start; |