🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52115

gcc with ELF

#52115
From: psc
Date: Wed, 03 Feb 1993 04:20
52 lines
2579 bytes
I am posting the following message for a friend.  Please respond to me by
email and I will relay all messages to him.


I am attempting to port gcc-2.2.2 and associated tools to SYSVR4 on
an 80386.  The specs for this port call for gas, gnu ld, gnu ar, etc. to be
used with gcc.  The output executables must be in ELF format.  I was able
to build all three stages of the compiler with relatively little difficulty.
The problems start when I attempt to use gas & gnu ld:

1:  the file crtstuff.c has asm() statements using att specific syntax.
	I can find no code for overriding these defines with gas syntax.

2:  I cannot make gnu ld (bfd version with ELF support) produce an executable
	that the system (ESIX SYSVR4) likes.  My link specs are:

-------------------------------------------------------------------------------
#define STARTFILE_SPEC  \
  "%{pg:gcrt1.o%s}%{!pg:%{posix:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}%{!posix:%{p:
   mcrt1.o%s}%{!p:-e _start -b elf-little crt1.o crti.o values-Xt.o%s -b 
   a.out-i386 }}} %{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}"

#define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -b elf-little crtn.o%s -b 
a.out-i386 -T ELFLITTLE"

ELFLITTLE script:
OUTPUT_ARCH( i386 )
OUTPUT_FORMAT( elf-little )

-------------------------------------------------------------------------------

    Note the added '-b xxx' & '-T ELFLITTLE' portions of the above defines.
	These hacks were an attempt to get ld(bfd) to create an ELF executable
	from a combination of a.out-i386 & elf-little .o files.


	My questions are specifically:

1:  is it possible (reasonable) to expect to be able to use gcc/gas/gld(bfd) to
	produce ELF executables on a System V, release 4 80386 host?

2:  if so, how?

-------------------------------------------------------------------------------

	Help/suggestions/comments on any of these problems would be greatly
appreciated.

Thank you,
Steve Passe
c/o psc@neocad.com
Denver, CO
Technical Details
Message-ID: <C1uuqs.52o@csn.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!brunix!sgiblab!zaphod.mps.ohio-state.edu!cs.utexas.edu!hellgate.utah.edu!csn!teal.csn.org!jty

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,3be9556ed32c3216,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-02-03 14:48:37 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!brunix!sgiblab!zaphod.mps.ohio-state.edu!cs.utexas.edu!hellgate.utah.edu!csn!teal.csn.org!jty
From: psc@neocad.com
Subject: gcc with ELF
Message-ID: <C1uuqs.52o@csn.org>
Originator: jty@teal.csn.org
Sender: news@csn.org (news)
Nntp-Posting-Host: teal.csn.org
Organization: Colorado SuperNet, Inc.
Distribution: gnu
Date: Wed, 3 Feb 1993 04:20:50 GMT
Lines: 52