Commit Graph

11 Commits

Author SHA1 Message Date
Bruce Evans
d983fa4305 Fixed printf format errors. gcc should have a macro HOST_PTR_PRINTF_TYPE
to go with its HOST_PTR_PRINTF[_FORMAT], since if %p is wrong for the
format then `void *' is probably wrong for the type.
1998-08-02 14:57:00 +00:00
Peter Wemm
9cb13c2344 First round of changes to support generation of assembler for the old
a.out gas and the binutils gas (elf or a.out) with a single compiler.

This uses other infrastructure not yet committed, in order to support
both a.out and elf it needs to be able to get to both a.out and elf
gas, ld, libs, crt* etc.  So for now, the support is pretty much dormant.

The new freebsd.h file is based on the old freebsd-elf.h file (which has a
long lineage, right back through linux and svr4 files).  The change is
pretty dramatic from a gcc internals standpoint as it overrides a lot of
definitions in order to generate different output based on target mode.
There is potential for screw-ups, so please be on the lookout - gcc's
configuration mechanism wasn't really meant for this kind of thing.
It's believed to compile world etc just fine under both a.out and elf, can
handle global constructors and destructors, handles the differences in
a.out and elf stabs, and what sections things like exceptions go in.

The initial idea came from i386/osfrose.h which is a dual rose/elf format
target.  These two are not as diverse as a.out and elf it would seem.

The cc front-end uses external configuration to determine default object
format (still being thrashed out, so read the source if you want to see
it so far), and has a '-aout' and '-elf' override command line switch.
There are some other internal switches that can be accessed, namely -maout,
-mno-aout, -munderscores and -mnounderscores.  The underscore and local
symbol prefixing rules are controllable seperately to the output format.
(ie: it's possible to generate a.out without the _ prefixes on symbols and
also to generate elf with the _ prefixes.  This isn't quite optimal, but
does seem to work pretty well, except the linkers don't always recognise
the local symbols without their normal names)

The default format is a.out (still), nobody should see any major changes.

With both elf and a.out tools and libraries installed:

[1:26pm]/tmp-223> cc -elf -o hello hello.c
peter@beast[1:27pm]/tmp-224> file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped
[1:27pm]/tmp-225> ./hello
hello world!

[1:27pm]/tmp-226> cc -aout -o hello hello.c
[1:27pm]/tmp-227> file hello
hello: FreeBSD/i386 compact demand paged dynamically linked executable not stripped
1:27pm]/tmp-228> ./hello
hello world!

Since my co-conspirators put a lot of effort into this too, I'll add them
so they can share the blame^H^H^H^H^Hglory. :-)

Reviewed by: sos, jdp
1998-03-08 05:29:49 +00:00
Satoshi Asami
7371365efc Make all the info dir entries line up neatly. 1997-05-28 07:49:21 +00:00
Joshua Peck Macdonald
a27d0c0f96 This file has the info annotation, except its annotated name
is different from its filename for some reason.
1997-01-11 02:56:24 +00:00
Peter Wemm
8adcea95d1 Remove temporary hack to disable use of libstdc++ now that it's built and
installed (and hopefully: working).
1996-10-04 08:51:18 +00:00
John Polstra
87f11ab41b Fix a bug that caused incorrect PIC code to be generated for exceptions.
The symptom was an assembler warning

    "GOT relocation burb: `___EXCEPTION_TABLE__' should be global"

followed (sometimes) by a core dump.  The fix makes the compiler
generate the correct GOTOFF addressing for that symbol, rather than the
GOT addressing it was emitting before.

Warning:  There is still at least one serious bug in the i386 exception
code for PIC.  The exception code that is generated clobbers the GOT
register (%ebx) and then tries to use it later.  That leads to core
dumps at program execution time.  I know where the problem is, but I do
not have a fix for it at this time.  Until it is fixed, exceptions will
not work in PIC code.  This is a general problem for all i386 platforms;
it is not specific to FreeBSD.
1996-10-03 17:49:35 +00:00
Peter Wemm
252bb01fbc Temporarily disable the code that wants to add -lstdc++ in tge g++ driver
since we don't have it yet and I've taken too long on the libg++-2.7.2
stuff (it causes problems due to to the lack of .weak support which I've
nearly finished)

Submitted by: "Ph. Charnier" <charnier@xp11.frmug.org>
1996-09-27 05:13:40 +00:00
Peter Wemm
24501dd0c6 My feeble attempt at fixing complaints that makeinfo makes about
errors in this doc.
1996-09-18 06:35:00 +00:00
Peter Wemm
d0fd7b1858 Do not print two \n's in a fatal error message.
Obtained from: bde
1996-09-18 06:33:32 +00:00
Peter Wemm
9882643d04 Import of 2.7.2.1 into vendor branch 1996-09-18 05:45:16 +00:00
Peter Wemm
a4cd5630b0 Import of unmodified (but trimmed) gcc-2.7.2. The bigger parts of the
non-i386, non-unix, and generatable files have been trimmed, but can easily
be added in later if needed.

gcc-2.7.2.1 will follow shortly, it's a very small delta to this and it's
handy to have both available for reference for such little cost.

The freebsd-specific changes will then be committed, and once the dust has
settled, the bmakefiles will be committed to use this code.
1996-09-18 05:35:50 +00:00