diff options
author | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-05 00:40:41 +0000 |
---|---|---|
committer | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-05 00:40:41 +0000 |
commit | f6ff45b5b0d670379779a72fe907f5147c2459bb (patch) | |
tree | b1540de4319151105aaad777b387219ef01bc592 /gcc/config/pa/elf.h | |
parent | 521f3adaa1baeaf00caf66ecb1761b845c1bcea7 (diff) |
This commit was manufactured by cvs2svn to create tagbje-unsw-branchpoint
'bje-unsw-branchpoint'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/bje-unsw-branchpoint@97592 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pa/elf.h')
-rw-r--r-- | gcc/config/pa/elf.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/gcc/config/pa/elf.h b/gcc/config/pa/elf.h index 0752e7b5b29..0fbb350c1e2 100644 --- a/gcc/config/pa/elf.h +++ b/gcc/config/pa/elf.h @@ -1,5 +1,5 @@ /* Definitions for ELF assembler support. - Copyright (C) 1999, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2003, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -45,27 +45,28 @@ do { \ } \ } while (0) -/* 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 (",ENTRY\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) \ + 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)) \ + fputs (",ENTRY\n", FILE); \ + else \ + fputs (",DATA\n", FILE); \ } while (0) /* The bogus HP assembler requires ALL external references to be |