Article View: gnu.g++.bug
Article #601COFF encapsulation vs ld -A
From: Eirik Fuller
Date: Sun, 19 Nov 1989 10:58
Date: Sun, 19 Nov 1989 10:58
59 lines
2407 bytes
2407 bytes
With the enclosed patches I can run libg++/tests/test0 to successful
completion on a sun386 with g++ using COFF encapsulation. Your line
numbers will probably be different; I started with ld.c from
g++-1.36.1, but I added patches for 68020 UTek (tek4300).
I have also run all of the other tests in libg++/tests/ through sun386
g++; only tRandom generates output different from what a sparc
generates; apparently tRandom's results are machine-dependent. My
recent postings to bug-gnu-utils and bug-gcc (gnu.utils.bug and
gnu.gcc.bug) contain most of what is necessary to build COFF
encapsulation g++ on a sun386, beyond the relevant GNU sources.
*** ld.c~ Tue Nov 7 13:58:42 1989
--- ld.c Sun Nov 19 02:41:07 1989
***************
*** 1022,1028 ****
text_size = sizeof (struct exec);
#ifdef COFF_ENCAPSULATE
! if (relocatable_output == 0)
{
need_coff_header = 1;
/* set this flag now, since it will change the values of N_TXTOFF, etc */
--- 1022,1028 ----
text_size = sizeof (struct exec);
#ifdef COFF_ENCAPSULATE
! if (relocatable_output == 0 && file_table[0].just_syms_flag == 0)
{
need_coff_header = 1;
/* set this flag now, since it will change the values of N_TXTOFF, etc */
***************
*** 1644,1649 ****
--- 1644,1653 ----
struct exec *loc = (struct exec *) &entry->header;
lseek (desc, entry->starting_offset, 0);
+ #ifdef COFF_ENCAPSULATE
+ if (entry->just_syms_flag)
+ lseek (desc, sizeof(coffheader), 1);
+ #endif
len = read (desc, loc, sizeof (struct exec));
if (len != sizeof (struct exec))
fatal_with_file ("failure reading header of ", entry);
***************
*** 1753,1758 ****
--- 1757,1767 ----
struct exec hdr;
desc = file_open (entry);
+
+ #ifdef COFF_ENCAPSULATE
+ if (entry->just_syms_flag)
+ lseek (desc, sizeof(coffheader),0);
+ #endif
len = read (desc, &hdr, sizeof hdr);
if (len != sizeof hdr)
Technical Details
Message-ID:
<8911191058.AA10797@elf.LABS.TEK.COM>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!fernwood!decwrl!ucbvax!tut.cis.ohio-state.edu!labs.labs.tek.com!eirikShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!fernwood!decwrl!ucbvax!tut.cis.ohio-state.edu!labs.labs.tek.com!eirik From: eirik@labs.labs.tek.com (Eirik Fuller) Newsgroups: gnu.g++.bug Subject: COFF encapsulation vs ld -A Message-ID: <8911191058.AA10797@elf.LABS.TEK.COM> Date: 19 Nov 89 10:58:27 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 59