- Dec 23, 2012
-
-
Avi Kivity authored
-
Avi Kivity authored
This forces the linker to add a DYNAMIC segment, allowing us to export our symbols to loaded libraries.
-
Avi Kivity authored
This gives us full control over linker options.
-
Avi Kivity authored
-
Avi Kivity authored
Not correct yet.
-
Avi Kivity authored
If .bss starts on a non-page boundary, the call to map_anon() will overwrite the last .data page. Fix by aligning the arguments to map_file() and map_anon() manually; this removes the overlap (since we round the .data section up).
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
not accurately though.
-
Avi Kivity authored
libgcc_s uses that (likely because it makes no syscalls)
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
Ignored, unneeded.
-
Avi Kivity authored
-
Avi Kivity authored
Should we warn instead?
-
Avi Kivity authored
prelinked libraries default to a non-zero address; we have to take that into account when computing the base.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
It's already loaded by PT_LOAD, we're only overwriting that page. (Strictly speaking we should read the file instead of mapping it, since it can be outside the loaded segment).
-
Avi Kivity authored
-
Avi Kivity authored
avoid conflicts
-
Avi Kivity authored
'program' will be used for cross-object linking
-
Avi Kivity authored
We need the headers so we can provide the symbols to loaded libraries. This means we cannot use objcopy to munge the binary format to elf32-i386, as the loader doesn't understand this format. Instead, add a separate 32-bit only stage (in elf32-i386 format) that loads the 64-bit image into memory as its payload. This keeps multiboot happy and leave our headers alone.
-
Avi Kivity authored
Used to encapsulate an already-loaded image, for providing symbols to later objects.
-
Avi Kivity authored
Change the starting program counter to 0x201000 instead of 0; this allows the ELF header to be present in the loaded image, and used for linking.
-
Avi Kivity authored
elf_object will be used where we have an elf image, but no file. This corresponds to the core image and libc functions.
-
Avi Kivity authored
We still do not look up symbols completely, since shared libraries are not provided yet.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
These sections have memsz > filesz. This means we need separate map_file() and file_anon() with caller-specified addresses.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-