summaryrefslogtreecommitdiff
path: root/gcc/config/cris
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-26 03:20:22 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-26 03:20:22 +0000
commit6bb21d381eda5acde1e4732fba39a040e9b041f5 (patch)
tree9ba1caadb88ecb5beadab9673342ae40c0206879 /gcc/config/cris
parentec20cf723e0fa1d7e9728aa6df401bd9212f9186 (diff)
downloadgcc-6bb21d381eda5acde1e4732fba39a040e9b041f5.tar.gz
* config/cris/cris.h (LIB_SPEC) <sim*>: Use -lsyslinux, not
-lsyssim. Wrap -lc -lsyssim in --start-group --end-group instead of doubling. (STARTFILE_SPEC): Add crti.o, before crtbegin.o. <sim*>: Always use crt1.o, regardless of N in simN. <!sim>: Drop support for -pg and -p variants; always use crt0.o. (ENDFILE_SPEC): Add crtn.o, after crtend.o. (CRT_CALL_STATIC_FUNCTION): Remove. * config/cris/aout.h (STARTFILE_SPEC): <!melinux && sim*>: Always use crt1.o, regardless of N in simN. <!sim>: Drop support for -pg and -p variants; always use crt0.o. (LIB_SPEC): Do not define; default to the one in config/cris/cris.h. (CRIS_CPP_SUBTARGET_SPEC) <melinux && !nostdinc>: Remove special case isystem setting. (MAX_OFILE_ALIGNMENT): Correct to 32, not 16. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94251 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/cris')
-rw-r--r--gcc/config/cris/aout.h29
-rw-r--r--gcc/config/cris/cris.h47
2 files changed, 12 insertions, 64 deletions
diff --git a/gcc/config/cris/aout.h b/gcc/config/cris/aout.h
index ec66b85b3cc..28fdac8e821 100644
--- a/gcc/config/cris/aout.h
+++ b/gcc/config/cris/aout.h
@@ -41,37 +41,14 @@ Boston, MA 02111-1307, USA. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{melinux:crt0.o%s}\
- %{!melinux:\
- %{sim2:s2crt0.o%s}\
- %{!sim2:\
- %{sim:scrt0.o%s}\
- %{!sim:%{pg:gcrt0.o%s}\
- %{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}}"
+ %{!melinux:%{sim*:crt1.o%s}%{!sim*:crt0.o%s}}"
/* Override cris.h define. */
#undef ENDFILE_SPEC
-/* Which library to get. The only difference from the default is to get
- libsc.a if -sim is given to the driver. Repeat -lc -lsysX
- {X=sim,linux}, because libsysX needs (at least) errno from libc, and
- then we want to resolve new unknowns in libc against libsysX, not
- libnosys. Assume everything is in libc for -mlinux. */
-#undef LIB_SPEC
-#define LIB_SPEC \
- "%{melinux:-lc -lsyslinux -lc -lsyslinux -lic}\
- %{!melinux:\
- %{sim*:-lc -lsyssim -lc -lsyssim}\
- %{!sim*:%{g*:-lg}\
- %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} -lbsp}\
- -lnosys}"
-
#undef CRIS_CPP_SUBTARGET_SPEC
#define CRIS_CPP_SUBTARGET_SPEC \
"%{melinux:-D__gnu_linux__ -D__linux__ -D__unix__ -D__elinux__ -D__uclinux__\
- %{!nostdinc:\
- %{!mbest-lib-options:%{isystem*}}\
- -isystem elinux/include%s\
- %{mbest-lib-options:%{isystem*}}}\
%{!ansi:%{!std=*:%{!undef:-Dlinux -Dunix -Delinux -Duclinux}}}}\
%{mbest-lib-options:\
%{!moverride-best-lib-options:\
@@ -135,8 +112,8 @@ Boston, MA 02111-1307, USA. */
/* Node: Storage Layout */
-/* We can align to 16 bits (only) with CRIS a.out. */
-#define MAX_OFILE_ALIGNMENT 16
+/* All sections but the .bss is rounded up to a 4-byte multiple size. */
+#define MAX_OFILE_ALIGNMENT 32
/* Node: Data Output */
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index d63da003329..66255ee53dd 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -210,35 +210,27 @@ extern const char *cris_elinux_stacksize_str;
%{sim2:%{!T*:-Tdata 0x4000000 -Tbss 0x8000000}}\
%{!r:%{O2|O3: --gc-sections}}"
-/* Which library to get. The only difference from the default is to get
- libsc.a if -sim is given to the driver. Repeat -lc -lsysX
- {X=sim,linux}, because libsysX needs (at least) errno from libc, and
- then we want to resolve new unknowns in libc against libsysX, not
- libnosys. */
+/* Which library to get. The simulator uses a different library for
+ the low-level syscalls (implementing the Linux syscall ABI instead
+ of direct-iron accesses). Default everything with the stub "nosys"
+ library. */
/* Override previous definitions (linux.h). */
#undef LIB_SPEC
#define LIB_SPEC \
- "%{sim*:-lc -lsyssim -lc -lsyssim}\
+ "%{sim*:--start-group -lc -lsyslinux --end-group}\
%{!sim*:%{g*:-lg}\
%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} -lbsp}\
-lnosys"
/* Linker startfile options; crt0 flavors.
-
- At the moment there are no gcrt0.o or mcrt0.o, but keep them here and
- link them to crt0.o to be prepared. Use scrt0.c if running the
- simulator, linear style, or s2crt0.c if fixed style. */
-/* We need to remove any previous definition (elfos.h). */
+ We need to remove any previous definition (elfos.h). */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
- "%{sim2:s2crt0.o%s}\
- %{!sim2:%{sim:scrt0.o%s}\
- %{!sim:%{pg:gcrt0.o%s}\
- %{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
- crtbegin.o%s"
+ "%{sim*:crt1.o%s}%{!sim*:crt0.o%s}\
+ crti.o%s crtbegin.o%s"
#undef ENDFILE_SPEC
-#define ENDFILE_SPEC "crtend.o%s"
+#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#define EXTRA_SPECS \
{"cpp_subtarget", CRIS_CPP_SUBTARGET_SPEC}, \
@@ -1335,27 +1327,6 @@ struct cum_args {int regs;};
/* The jump table is immediately connected to the preceding insn. */
#define JUMP_TABLES_IN_TEXT_SECTION 1
-/* We pull a little trick to register the _fini function with atexit,
- after (presumably) registering the eh frame info, since we don't handle
- _fini (a.k.a. ___fini_start) in crt0 or have a crti for "pure" ELF. If
- you change this, don't forget that you can't have library function
- references (e.g. to atexit) in crtend.o, since those won't be resolved
- to libraries; those are linked in *before* crtend.o. */
-#ifdef CRT_BEGIN
-# define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
-static void __attribute__((__used__)) \
-call_ ## FUNC (void) \
-{ \
- asm (SECTION_OP); \
- FUNC (); \
- if (__builtin_strcmp (#FUNC, "frame_dummy") == 0) \
- { \
- extern void __fini__start (void); \
- atexit (__fini__start); \
- } \
- asm (TEXT_SECTION_ASM_OP); \
-}
-#endif
/* Node: PIC */