Article View: gnu.gcc.help
Article #52270GDB and libbfd.a
From: Ray Frederick
Date: Tue, 08 Dec 1992 16:05
Date: Tue, 08 Dec 1992 16:05
25 lines
1894 bytes
1894 bytes
Is there complete documentation to the bfd library? I only found bfd.texinfo in bfd/doc and it isn't complete. I have been trying to follow the code that recognizes a loadfile but I don't have any luck. For example in bfd/format.c the function bfd_check_format I assume must access the loadfile and determine what format it is. Thus with the ABinaryFileDescriptor defaulted to say a.out-sunos-big (abfd->defaulted = True), from bfd.h the #define BFD_SEND_FMT(bfd,message,arglist) (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) and finally the call in bfd/format.c of temp - BFD_SEND_FMT (abfd, _bfd_check_format, (abfd)), This should do a call to the specific format check routine for whatever target abfd->xvec points to. What I can't figure out is how this is determined and what the macro expands to. My best guess is that the bfd abfd's field xvec is a pointer to a bfd target. Thus the BFD_SENT_FMT must expand to a call to that specific targets _bfd_check_format but I can't figure out exactly how this is done. I am interested in creating a new bfd but would like to be able to follow the code that examines the files structure first. Any help would be greatly appreciated. Ray. s442013@nexus.yorku.ca
Technical Details
Message-ID:
<s442013.723830714@yorku.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!wupost!cs.utexas.edu!torn!newshub.ccs.yorku.ca!yorku.ca!s442013Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,bf62a4c9fd75be49,start X-Google-Attributes: gid11318c,public X-Google-Thread: 1135a1,bf62a4c9fd75be49,start X-Google-Attributes: gid1135a1,public X-Google-ArrivalTime: 1992-12-08 08:50:50 PST Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!wupost!cs.utexas.edu!torn!newshub.ccs.yorku.ca!yorku.ca!s442013 From: s442013@nexus.yorku.ca (Ray Frederick) Newsgroups: gnu.gcc.help,gnu.gdb Subject: GDB and libbfd.a Message-ID: <s442013.723830714@yorku.ca> Date: 8 Dec 92 16:05:14 GMT Sender: news@newshub.ccs.yorku.ca (USENET News System) Organization: York University Lines: 25