summaryrefslogtreecommitdiffstats
path: root/gcc/config/pa/som.h
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-27 04:22:06 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-27 04:22:06 +0000
commit02604695328a2359b85f71de5a07c28130932621 (patch)
treecc617f29a3ce79128e6bfcdfba8ab7ff0bb3d12d /gcc/config/pa/som.h
parentfa94fe2c1ae7e1dac0d6f4e92bb05ed6e34ceb46 (diff)
downloadppe42-gcc-02604695328a2359b85f71de5a07c28130932621.tar.gz
ppe42-gcc-02604695328a2359b85f71de5a07c28130932621.zip
* pa/elf.h, pa/som.h (ASM_OUTPUT_EXTERNAL): Use assemble_name_raw
instead of trying to save and restore TREE_SYMBOL_REFERENCED. * pa/pa64-hpux.h (ASM_OUTPUT_TYPE_DIRECTIVE): Define. (ASM_OUTPUT_EXTERNAL): Don't save and restore TREE_SYMBOL_REFERENCED. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95605 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pa/som.h')
-rw-r--r--gcc/config/pa/som.h41
1 files changed, 20 insertions, 21 deletions
diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h
index e06a0912493..2585bb4d159 100644
--- a/gcc/config/pa/som.h
+++ b/gcc/config/pa/som.h
@@ -216,27 +216,26 @@ do { \
So, we force exception information into the data section. */
#define TARGET_ASM_EXCEPTION_SECTION data_section
-/* This is how to output a command to make the user-level label named NAME
- defined for reference from other files.
-
- We call assemble_name, which in turn sets TREE_SYMBOL_REFERENCED. This
- macro will restore the original value of TREE_SYMBOL_REFERENCED to avoid
- placing useless function definitions in the output file.
-
- Also note that the SOM based tools need the symbol imported as a CODE
- symbol, while the ELF based tools require the symbol to be imported as
- an ENTRY symbol. What a crock. */
-
-#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
- do { int save_referenced; \
- save_referenced = TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (DECL)); \
- fputs ("\t.IMPORT ", FILE); \
- assemble_name (FILE, NAME); \
- if (FUNCTION_NAME_P (NAME)) \
- fputs (",CODE\n", FILE); \
- else \
- fputs (",DATA\n", FILE); \
- TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (DECL)) = save_referenced; \
+/* This is how to output a command to make the user-level label
+ named NAME defined for reference from other files. We use
+ assemble_name_raw instead of assemble_name since a symbol in
+ a .IMPORT directive that isn't otherwise referenced is not
+ placed in the symbol table of the assembled object.
+
+ Failure to import a function reference can cause the HP linker
+ to segmentation fault!
+
+ Note that the SOM based tools need the symbol imported as a
+ CODE symbol, while the ELF based tools require the symbol to
+ be imported as an ENTRY symbol. */
+
+#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
+ do { fputs ("\t.IMPORT ", FILE); \
+ assemble_name_raw (FILE, NAME); \
+ if (FUNCTION_NAME_P (NAME)) \
+ fputs (",CODE\n", FILE); \
+ else \
+ fputs (",DATA\n", FILE); \
} while (0)
/* The bogus HP assembler requires ALL external references to be
OpenPOWER on IntegriCloud