Getting to the Symbol/String table
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Organization: Oracle Corporation User-agent: Thunderbird 2.0.0.17 (Windows/20080914) Thanks. -- Disclaimer : The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Hi, I want to be able to find a symbol given an address . For that, I would like to know how do I go to the begining of the symbol/string table present in the __LINKEDIT section. I can parse through the headers and reach to the LC_SYMTAB segment and the __LINKEDIT segment . From here on , how can I use the below values ( including the slide amount ) to get the base of the symbol table and the string table ( so that I can scan through the lists to find my symbol ) : symtab_command.symoff - An integer containing the byte offset from the start of the file to the location of the symbol table entries. symtab_command.stroff - An integer containing the byte offset from the start of the image to the location of the string table. My logic goes as below : 1 . Get the count of the images _dyld_image_count and loop through it and get the emage headers through _dyld_get_image_header() . 2 . Check for symtab/linkedit segments and store their addressess accordingly. A couple of more questions : 1. I wanted to know the actual reasoning for the slide amount which I get through _dyld_get_image_vmaddr_slide() . 2. dlsym() complains of _start/start as not a valid symbol even though I can see it from the o/p of the nm command. This email sent to site_archiver@lists.apple.com
participants (1)
-
Rohitash