diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2005-03-05 01:59:24 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2005-03-05 01:59:24 +0000 |
commit | 744b2d61842718ac04d5ce0b55c179262147ce98 (patch) | |
tree | 24488badd6a83dd0628351ad2c259f08314f16ae /gcc/config/pa/som.h | |
parent | 1fb641a1e18cb92d7034ea165a11d28ada6d228e (diff) | |
download | gcc-744b2d61842718ac04d5ce0b55c179262147ce98.zip gcc-744b2d61842718ac04d5ce0b55c179262147ce98.tar.gz gcc-744b2d61842718ac04d5ce0b55c179262147ce98.tar.bz2 |
re PR c++/19797 (g++.dg/abi/inline1.C fails on hppa*-*-hpux*)
PR c++/19797
* elf.h, pa64-hpux.h, som.h (ASM_OUTPUT_EXTERNAL_REAL): Define.
(ASM_OUTPUT_EXTERNAL): Call pa_hpux_asm_output_external.
* pa-protos.h (pa_hpux_asm_output_external): Add prototype.
* pa.c (get_plabel): Change argument to symbol_ref. Call
maybe_get_identifier instead of get_identifier.
(pa_hpux_asm_output_external, pa_hpux_file_end): New functions.
(struct deferred_plabel): Replace name field with symbol field.
(TARGET_ASM_FILE_END): Define as pa_hpux_file_end if
ASM_OUTPUT_EXTERNAL_REAL is defined.
(output_global_address): Use output_addr_const for output of all
symbol_refs.
(output_deferred_plabels): Use symbol_ref instead of name for address
output.
* pa.h (SYMBOL_FLAG_REFERENCED, SYMBOL_REF_REFERENCED_P,
ASM_OUTPUT_SYMBOL_REF): New macros.
* som.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Use assemble_name_raw. Update
comment.
(ASM_WEAKEN_LABEL): Use targetm.asm_out.globalize_label to globalize
label.
* g++.dg/abi/vague1.C: Remove xfail hppa*-*-hpux*.
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
From-SVN: r95921
Diffstat (limited to 'gcc/config/pa/som.h')
-rw-r--r-- | gcc/config/pa/som.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h index 2585bb4..d937876 100644 --- a/gcc/config/pa/som.h +++ b/gcc/config/pa/som.h @@ -230,6 +230,8 @@ do { \ be imported as an ENTRY symbol. */ #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ + pa_hpux_asm_output_external ((FILE), (DECL), (NAME)) +#define ASM_OUTPUT_EXTERNAL_REAL(FILE, DECL, NAME) \ do { fputs ("\t.IMPORT ", FILE); \ assemble_name_raw (FILE, NAME); \ if (FUNCTION_NAME_P (NAME)) \ @@ -239,14 +241,22 @@ do { \ } while (0) /* The bogus HP assembler requires ALL external references to be - "imported", even library calls. They look a bit different, so + "imported", even library calls. They look a bit different, so here's this macro. Also note not all libcall names are passed to pa_encode_section_info (__main for example). To make sure all libcall names have section - info recorded in them, we do it here. We must also ensure that - we don't import a libcall that has been previously exported since - the HP assembler may change an ENTRY symbol to a CODE symbol. */ + info recorded in them, we do it here. + + We must also ensure that a libcall that has been previously + exported is not subsequently imported since the HP assembler may + change the type from an ENTRY to a CODE symbol. This would make + the symbol local. We are forced to use the identifier node + associated with the real assembler name for this check as the + symbol_ref available in ASM_DECLARE_FUNCTION_NAME is not the + same as the one used here. As a result, we can't use flags + in the symbol_ref for this check. The identifier check assumes + assemble_external_libcall is called before the symbol is used. */ #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, RTL) \ do { const char *name; \ @@ -260,7 +270,7 @@ do { \ if (!id || !TREE_SYMBOL_REFERENCED (id)) \ { \ fputs ("\t.IMPORT ", FILE); \ - assemble_name (FILE, XSTR ((RTL), 0)); \ + assemble_name_raw (FILE, XSTR ((RTL), 0)); \ fputs (",CODE\n", FILE); \ } \ } while (0) @@ -357,12 +367,7 @@ do { \ do { fputs ("\t.weak\t", FILE); \ assemble_name (FILE, NAME); \ fputc ('\n', FILE); \ - if (! FUNCTION_NAME_P (NAME)) \ - { \ - fputs ("\t.EXPORT ", FILE); \ - assemble_name (FILE, NAME); \ - fputs (",DATA\n", FILE); \ - } \ + targetm.asm_out.globalize_label (FILE, NAME); \ } while (0) /* We can't handle weak aliases, and therefore can't support pragma weak. |