aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2002-05-23 02:26:47 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2002-05-22 22:26:47 -0400
commitcbaaba19a4051beef0a3efb2121c155ec094787f (patch)
treea88f0cc44a86c5263c89aaa86495a856ca323af0 /gcc
parent1671e363a6d7c0127b2e38de4cdbb05434b6c6aa (diff)
downloadgcc-cbaaba19a4051beef0a3efb2121c155ec094787f.zip
gcc-cbaaba19a4051beef0a3efb2121c155ec094787f.tar.gz
gcc-cbaaba19a4051beef0a3efb2121c155ec094787f.tar.bz2
aix43.h (LINK_SPEC): Add PE initializer.
* config/rs6000/aix43.h (LINK_SPEC): Add PE initializer. (STARTFILE_SPEC): Delete PE crt0.o. * config/rs6000/aix51.h: Same. * config/rs6000/rs6000.c: Use TARGET_XCOFF, not OBJECT_FORMAT_COFF. * config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Append [DS] to function descriptor symbol. Use RS6000_OUTPUT_BASENAME. (ASM_OUTPUT_DEF_FROM_DECLS): Use RS6000_OUTPUT_BASENAME. * config/rs6000/xcoff.h (ASM_OUTPUT_DEF): Define. From-SVN: r53756
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/rs6000/aix43.h15
-rw-r--r--gcc/config/rs6000/aix51.h15
-rw-r--r--gcc/config/rs6000/rs6000.c8
-rw-r--r--gcc/config/rs6000/rs6000.h18
-rw-r--r--gcc/config/rs6000/xcoff.h9
6 files changed, 46 insertions, 30 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9ededbc..a668454 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2002-05-22 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/aix43.h (LINK_SPEC): Add PE initializer.
+ (STARTFILE_SPEC): Delete PE crt0.o.
+ * config/rs6000/aix51.h: Same.
+ * config/rs6000/rs6000.c: Use TARGET_XCOFF, not OBJECT_FORMAT_COFF.
+ * config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Append [DS] to
+ function descriptor symbol. Use RS6000_OUTPUT_BASENAME.
+ (ASM_OUTPUT_DEF_FROM_DECLS): Use RS6000_OUTPUT_BASENAME.
+ * config/rs6000/xcoff.h (ASM_OUTPUT_DEF): Define.
+
2002-05-22 Richard Henderson <rth@redhat.com>
* varasm.c (default_section_type_flags): Handle tls data and
diff --git a/gcc/config/rs6000/aix43.h b/gcc/config/rs6000/aix43.h
index 7aa8707..8fe9859 100644
--- a/gcc/config/rs6000/aix43.h
+++ b/gcc/config/rs6000/aix43.h
@@ -186,18 +186,15 @@ do { \
#undef LINK_SPEC
#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\
%{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\
- %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}"
+ %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}\
+ %{mpe:-binitfini:poe_remote_main}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:\
- %{mpe:%{pg:/usr/lpp/ppe.poe/lib/gcrt0.o}\
- %{!pg:%{p:/usr/lpp/ppe.poe/lib/mcrt0.o}\
- %{!p:/usr/lpp/ppe.poe/lib/crt0.o}}}\
- %{!mpe:\
- %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\
- %{!maix64:\
- %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
- %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}}"
+ %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\
+ %{!maix64:\
+ %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
+ %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}"
/* AIX 4.3 typedefs ptrdiff_t as "long" while earlier releases used "int". */
diff --git a/gcc/config/rs6000/aix51.h b/gcc/config/rs6000/aix51.h
index 96a6a63..eae90f6 100644
--- a/gcc/config/rs6000/aix51.h
+++ b/gcc/config/rs6000/aix51.h
@@ -185,18 +185,15 @@ do { \
#undef LINK_SPEC
#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\
%{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\
- %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}"
+ %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}\
+ %{mpe:-binitfini:poe_remote_main}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:\
- %{mpe:%{pg:/usr/lpp/ppe.poe/lib/gcrt0.o}\
- %{!pg:%{p:/usr/lpp/ppe.poe/lib/mcrt0.o}\
- %{!p:/usr/lpp/ppe.poe/lib/crt0.o}}}\
- %{!mpe:\
- %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\
- %{!maix64:\
- %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
- %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}}"
+ %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\
+ %{!maix64:\
+ %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
+ %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}"
/* AIX V5 typedefs ptrdiff_t as "long" while earlier releases used "int". */
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 071e400..12b27d4 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -171,7 +171,7 @@ static void rs6000_elf_select_rtx_section PARAMS ((enum machine_mode, rtx,
static void rs6000_elf_encode_section_info PARAMS ((tree, int));
static const char *rs6000_elf_strip_name_encoding PARAMS ((const char *));
#endif
-#ifdef OBJECT_FORMAT_COFF
+#if TARGET_XCOFF
static void xcoff_asm_named_section PARAMS ((const char *, unsigned int));
static void rs6000_xcoff_select_section PARAMS ((tree, int,
unsigned HOST_WIDE_INT));
@@ -267,7 +267,7 @@ static const char alt_reg_names[][8] =
/* Default unaligned ops are only provided for ELF. Find the ops needed
for non-ELF systems. */
#ifndef OBJECT_FORMAT_ELF
-#ifdef OBJECT_FORMAT_COFF
+#if TARGET_XCOFF
/* For XCOFF. rs6000_assemble_integer will handle unaligned DIs on
64-bit targets. */
#undef TARGET_ASM_UNALIGNED_HI_OP
@@ -11643,7 +11643,7 @@ rs6000_elf_asm_out_destructor (symbol, priority)
}
#endif
-#ifdef OBJECT_FORMAT_COFF
+#if TARGET_XCOFF
static void
xcoff_asm_named_section (name, flags)
const char *name;
@@ -11734,7 +11734,7 @@ rs6000_xcoff_strip_name_encoding (name)
return name;
}
-#endif /* OBJECT_FORMAT_COFF */
+#endif /* TARGET_XCOFF */
/* Note that this is also used for ELF64. */
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 4e9edff..38b89fc 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -2442,12 +2442,14 @@ extern int toc_initialized;
do \
{ \
fputs ("\t.weak\t", (FILE)); \
- assemble_name ((FILE), (NAME)); \
+ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL \
&& DEFAULT_ABI == ABI_AIX) \
{ \
+ if (TARGET_XCOFF) \
+ fputs ("[DS]", (FILE)); \
fputs ("\n\t.weak\t.", (FILE)); \
- assemble_name ((FILE), (NAME)); \
+ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
} \
fputc ('\n', (FILE)); \
if (VAL) \
@@ -2457,9 +2459,9 @@ extern int toc_initialized;
&& DEFAULT_ABI == ABI_AIX) \
{ \
fputs ("\t.set\t.", (FILE)); \
- assemble_name ((FILE), (NAME)); \
+ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
fputs (",.", (FILE)); \
- assemble_name ((FILE), (VAL)); \
+ RS6000_OUTPUT_BASENAME ((FILE), (VAL)); \
fputc ('\n', (FILE)); \
} \
} \
@@ -2482,20 +2484,20 @@ extern int toc_initialized;
if (!RS6000_WEAK || !DECL_WEAK (DECL)) \
{ \
fputs ("\t.globl\t.", FILE); \
- assemble_name (FILE, alias); \
+ RS6000_OUTPUT_BASENAME (FILE, alias); \
putc ('\n', FILE); \
} \
} \
else if (TARGET_XCOFF) \
{ \
fputs ("\t.lglobl\t.", FILE); \
- assemble_name (FILE, alias); \
+ RS6000_OUTPUT_BASENAME (FILE, alias); \
putc ('\n', FILE); \
} \
fputs ("\t.set\t.", FILE); \
- assemble_name (FILE, alias); \
+ RS6000_OUTPUT_BASENAME (FILE, alias); \
fputs (",.", FILE); \
- assemble_name (FILE, name); \
+ RS6000_OUTPUT_BASENAME (FILE, name); \
fputc ('\n', FILE); \
} \
ASM_OUTPUT_DEF (FILE, alias, name); \
diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h
index 90f2727..2c39243 100644
--- a/gcc/config/rs6000/xcoff.h
+++ b/gcc/config/rs6000/xcoff.h
@@ -382,6 +382,15 @@ toc_section () \
/* This is how we tell the assembler that two symbols have the same value. */
#define SET_ASM_OP "\t.set "
+/* This is how we tell the assembler to equate two values. */
+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
+ do { fprintf ((FILE), "%s", SET_ASM_OP); \
+ RS6000_OUTPUT_BASENAME (FILE, LABEL1); \
+ fprintf (FILE, ","); \
+ RS6000_OUTPUT_BASENAME (FILE, LABEL2); \
+ fprintf (FILE, "\n"); \
+ } while (0)
+
/* Used by rs6000_assemble_integer, among others. */
#define DOUBLE_INT_ASM_OP "\t.llong\t"