Subject: Re: about .Note section of ELF; was: CLD symbol table object on Itanium From: VAXman- @SendSpamHere.ORG Date: Sun, 27 Mar 2005 13:08:23 GMT Newsgroups: comp.os.vms In article <00A414EB.33E2FF98@SendSpamHere.ORG>, VAXman- @SendSpamHere.ORG writes: >>In article , John Reagan writes: > >>>>VAXman- @SendSpamHere.ORG wrote: >>>> >> >>>>>> >>>>>> I've had my head in ELF image layouts all day too trying to understand how >>>>>> to get at the image ident info in the .note section. Finally happened up- >>>>>> on NHDR$ defs in $ELFDEF which was hiding in STARLET and not in LIB like >>>>>> all of the VAX and Alpha image def files. Sheesh, so much for consistency. >>>>>> >> >>>> >>>>Can't say what that happened other than a tip-o-the-hat to ELF's >>>>standardization (whatever that is worth)??? >>>> >>>>By now, you know that fishing the image ident out of an ELF image is not >>>>for the faint of heart. For the rest of the readers, the image ident is >>>>located at a somewhat fixed offset in the image header on Alpha and VAX. >>>> On ELF, there is no such concept. What ELF does provide is a "note" >>>>section that essentially allows any system to encode any sort of data. >>>>We use them in object files to hold the compiler name which compiled the >>>>module, the compilation date/time, etc. Getting at them from inside a >>>>program involves opening the file, finding the note section and >>>>processing all the notes. We are looking at adding some callable API in >>>>a future release to make it all easier. > >> >>It appears from the images that I've examined that the .Note section >>falls on a block boundary. Is this just a figment of the images that >>I have empirically examined or is this always the case? HAPPY EASTER! It does appear to be that the .Note section always falls on a block boundary. I've successfully coded my little project and can now extract the image idents from all of the images activated to run my image (ie. the list off of IAC$GL_IMAGE_LIST). Break out the Guinness ice cream and the hard boiled eggs; it's time to celebrate. This Itanium stuff isn't so bad... just ugly. -- VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)COM "Well my son, life is like a beanstalk, isn't it?"