Message board for the users of flat assembler.
> Linux > ELF loader/dynamic linker
Iam writing a loader/dynamic linker of ELF binaries for windows, and got stuck with some symbols relocations.
Specifically, program (any of coreutils) contains following code:
mov edx,[0804C744h] mov eax,[edx+14h] cmp eax,[edx+18h] jnb ...
The 0804C744h offset is in the empty space after the program image, so i assume it should be filled by linker.
The address is found in .dynsym like that:
st_name="opterr",st_value=0x0804C740,st_size=0x00000004,st_info=0x11,st_other=0x00,st_shndx=0x0017 st_name="stdout",st_value=0x0804C744,st_size=0x00000004,st_info=0x11,st_other=0x00,st_shndx=0x0017 st_name="stderr",st_value=0x0804C748,st_size=0x00000004,st_info=0x11,st_other=0x00,st_shndx=0x0017
So, i assume that something about stdout should be at that address.
The question is, what should it be?
Looks like a file description struct, but mingw one doesn't fit the code, and i wasn't able to locate linux one description in glibc or kernel sources.
Or, more generally, where could i get a comprehensible manual on meaning of .got, .got.plt values, usage and ELF loading process in general (other than TIS ELF.pdf and glibc and linux sources)?
|22 Sep 2007, 21:00||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.