Commit cbaaba19 by David Edelsohn Committed by David Edelsohn

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
parent 1671e363
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> 2002-05-22 Richard Henderson <rth@redhat.com>
* varasm.c (default_section_type_flags): Handle tls data and * varasm.c (default_section_type_flags): Handle tls data and
......
...@@ -186,18 +186,15 @@ do { \ ...@@ -186,18 +186,15 @@ do { \
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\ #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\
%{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\ %{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 #undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:\ #define STARTFILE_SPEC "%{!shared:\
%{mpe:%{pg:/usr/lpp/ppe.poe/lib/gcrt0.o}\ %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\
%{!pg:%{p:/usr/lpp/ppe.poe/lib/mcrt0.o}\ %{!maix64:\
%{!p:/usr/lpp/ppe.poe/lib/crt0.o}}}\ %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
%{!mpe:\ %{!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". */ /* AIX 4.3 typedefs ptrdiff_t as "long" while earlier releases used "int". */
......
...@@ -185,18 +185,15 @@ do { \ ...@@ -185,18 +185,15 @@ do { \
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\ #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\
%{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\ %{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 #undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:\ #define STARTFILE_SPEC "%{!shared:\
%{mpe:%{pg:/usr/lpp/ppe.poe/lib/gcrt0.o}\ %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\
%{!pg:%{p:/usr/lpp/ppe.poe/lib/mcrt0.o}\ %{!maix64:\
%{!p:/usr/lpp/ppe.poe/lib/crt0.o}}}\ %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
%{!mpe:\ %{!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". */ /* AIX V5 typedefs ptrdiff_t as "long" while earlier releases used "int". */
......
...@@ -171,7 +171,7 @@ static void rs6000_elf_select_rtx_section PARAMS ((enum machine_mode, rtx, ...@@ -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 void rs6000_elf_encode_section_info PARAMS ((tree, int));
static const char *rs6000_elf_strip_name_encoding PARAMS ((const char *)); static const char *rs6000_elf_strip_name_encoding PARAMS ((const char *));
#endif #endif
#ifdef OBJECT_FORMAT_COFF #if TARGET_XCOFF
static void xcoff_asm_named_section PARAMS ((const char *, unsigned int)); static void xcoff_asm_named_section PARAMS ((const char *, unsigned int));
static void rs6000_xcoff_select_section PARAMS ((tree, int, static void rs6000_xcoff_select_section PARAMS ((tree, int,
unsigned HOST_WIDE_INT)); unsigned HOST_WIDE_INT));
...@@ -267,7 +267,7 @@ static const char alt_reg_names[][8] = ...@@ -267,7 +267,7 @@ static const char alt_reg_names[][8] =
/* Default unaligned ops are only provided for ELF. Find the ops needed /* Default unaligned ops are only provided for ELF. Find the ops needed
for non-ELF systems. */ for non-ELF systems. */
#ifndef OBJECT_FORMAT_ELF #ifndef OBJECT_FORMAT_ELF
#ifdef OBJECT_FORMAT_COFF #if TARGET_XCOFF
/* For XCOFF. rs6000_assemble_integer will handle unaligned DIs on /* For XCOFF. rs6000_assemble_integer will handle unaligned DIs on
64-bit targets. */ 64-bit targets. */
#undef TARGET_ASM_UNALIGNED_HI_OP #undef TARGET_ASM_UNALIGNED_HI_OP
...@@ -11643,7 +11643,7 @@ rs6000_elf_asm_out_destructor (symbol, priority) ...@@ -11643,7 +11643,7 @@ rs6000_elf_asm_out_destructor (symbol, priority)
} }
#endif #endif
#ifdef OBJECT_FORMAT_COFF #if TARGET_XCOFF
static void static void
xcoff_asm_named_section (name, flags) xcoff_asm_named_section (name, flags)
const char *name; const char *name;
...@@ -11734,7 +11734,7 @@ rs6000_xcoff_strip_name_encoding (name) ...@@ -11734,7 +11734,7 @@ rs6000_xcoff_strip_name_encoding (name)
return name; return name;
} }
#endif /* OBJECT_FORMAT_COFF */ #endif /* TARGET_XCOFF */
/* Note that this is also used for ELF64. */ /* Note that this is also used for ELF64. */
......
...@@ -2442,12 +2442,14 @@ extern int toc_initialized; ...@@ -2442,12 +2442,14 @@ extern int toc_initialized;
do \ do \
{ \ { \
fputs ("\t.weak\t", (FILE)); \ fputs ("\t.weak\t", (FILE)); \
assemble_name ((FILE), (NAME)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL \ if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL \
&& DEFAULT_ABI == ABI_AIX) \ && DEFAULT_ABI == ABI_AIX) \
{ \ { \
if (TARGET_XCOFF) \
fputs ("[DS]", (FILE)); \
fputs ("\n\t.weak\t.", (FILE)); \ fputs ("\n\t.weak\t.", (FILE)); \
assemble_name ((FILE), (NAME)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
} \ } \
fputc ('\n', (FILE)); \ fputc ('\n', (FILE)); \
if (VAL) \ if (VAL) \
...@@ -2457,9 +2459,9 @@ extern int toc_initialized; ...@@ -2457,9 +2459,9 @@ extern int toc_initialized;
&& DEFAULT_ABI == ABI_AIX) \ && DEFAULT_ABI == ABI_AIX) \
{ \ { \
fputs ("\t.set\t.", (FILE)); \ fputs ("\t.set\t.", (FILE)); \
assemble_name ((FILE), (NAME)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
fputs (",.", (FILE)); \ fputs (",.", (FILE)); \
assemble_name ((FILE), (VAL)); \ RS6000_OUTPUT_BASENAME ((FILE), (VAL)); \
fputc ('\n', (FILE)); \ fputc ('\n', (FILE)); \
} \ } \
} \ } \
...@@ -2482,20 +2484,20 @@ extern int toc_initialized; ...@@ -2482,20 +2484,20 @@ extern int toc_initialized;
if (!RS6000_WEAK || !DECL_WEAK (DECL)) \ if (!RS6000_WEAK || !DECL_WEAK (DECL)) \
{ \ { \
fputs ("\t.globl\t.", FILE); \ fputs ("\t.globl\t.", FILE); \
assemble_name (FILE, alias); \ RS6000_OUTPUT_BASENAME (FILE, alias); \
putc ('\n', FILE); \ putc ('\n', FILE); \
} \ } \
} \ } \
else if (TARGET_XCOFF) \ else if (TARGET_XCOFF) \
{ \ { \
fputs ("\t.lglobl\t.", FILE); \ fputs ("\t.lglobl\t.", FILE); \
assemble_name (FILE, alias); \ RS6000_OUTPUT_BASENAME (FILE, alias); \
putc ('\n', FILE); \ putc ('\n', FILE); \
} \ } \
fputs ("\t.set\t.", FILE); \ fputs ("\t.set\t.", FILE); \
assemble_name (FILE, alias); \ RS6000_OUTPUT_BASENAME (FILE, alias); \
fputs (",.", FILE); \ fputs (",.", FILE); \
assemble_name (FILE, name); \ RS6000_OUTPUT_BASENAME (FILE, name); \
fputc ('\n', FILE); \ fputc ('\n', FILE); \
} \ } \
ASM_OUTPUT_DEF (FILE, alias, name); \ ASM_OUTPUT_DEF (FILE, alias, name); \
......
...@@ -382,6 +382,15 @@ toc_section () \ ...@@ -382,6 +382,15 @@ toc_section () \
/* This is how we tell the assembler that two symbols have the same value. */ /* This is how we tell the assembler that two symbols have the same value. */
#define SET_ASM_OP "\t.set " #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. */ /* Used by rs6000_assemble_integer, among others. */
#define DOUBLE_INT_ASM_OP "\t.llong\t" #define DOUBLE_INT_ASM_OP "\t.llong\t"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment