flat assembler
Message board for the users of flat assembler.

Index > Linux > ELF loader/dynamic linker

Thread Post new topic Reply to topic

Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
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:

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)?
Post 22 Sep 2007, 21:00
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.