Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!ucsfcgl!cca.ucsf.edu!root From: root@cca.ucsf.edu (Computer Center) Newsgroups: comp.emacs Subject: Re: Gnu binary utilities Message-ID: <1230@ucsfcca.ucsf.edu> Date: 14 Apr 88 00:23:50 GMT References: <923@unmvax.unm.edu> <1229@ucsfcca.ucsf.edu> Organization: Computer Center, UCSF Lines: 45 Summary: Followup: making a running GNU ld In article <1229@ucsfcca.ucsf.edu>, root@cca.ucsf.edu (Computer Center) writes: > In article <923@unmvax.unm.edu>, mike@turing.UNM.EDU (Michael I. Bushnell) writes: > > > > A while back, I was poking around on uunet.uu.net, in the gnu > > subdirectory. I fetched the gnubin stuff, but I have some questions. > > First, ld.c requires the include file "symseg.h". I couldn't find > > The file "symseg.h" may be found in the gnu-gdb.tar.Z distribution. > > Also, the uunet file is gnu/binutils.tar.Z, not gnu/gnubin. > The "symseg.h" file taken from gdb.tar.Z (this file appears under several names on different systems) is not quite enough to get ld to compile and link under BSD4.3. The following fragment was extracted from the core.c file in the same archive: #ifndef N_TXTADDR #define N_TXTADDR(hdr) 0 #endif /* no N_TXTADDR */ #ifndef N_DATADDR #define N_DATADDR(hdr) hdr.a_text #endif /* no N_DATADDR */ and appending this to the symseg.h file allowed the generation of a running GNU ld using the BSD4.3 cc and ld. The following command was used to self-link GNU ld from that version (running as ./ld) to make the file nd which also appeared to execute normally: ./ld /lib/crt0.o ld.o -lc -o nd Running ./nd in place of ./ld produced a file identical (cmp null output) to the nd file. The binary files which result are different depending on whether the BSD4.3 ld or the GNU ld is used to link with the above argument list. They are of different lengths as produced but are the same length (but still different) after stripping by the BSD4.3 strip command.