In an ELF file, how does the address for _start get detemined?

后端 未结 3 887
故里飘歌
故里飘歌 2020-12-11 18:01

I\'ve been reading the ELF specification and cannot figure out where the program entry point and _start address come from.

It seems like they should have to be in a

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-11 18:53

    I'm not sure but try this link http://www.docstoc.com/docs/23942105/UNIX-ELF-File-Format at page 8 it is shown where the entry point is if it is executable. Basically you need to calculate the offset and you got it. Make sure to remember the little endianness of x86 ( i guess you use it) and reorder if you read bytewise edit: or maybe not i'm not quit sure about this to be honest.

提交回复
热议问题