diff options
author | merrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-04-30 18:13:30 +0000 |
---|---|---|
committer | merrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-04-30 18:13:30 +0000 |
commit | 9b6402f5b307410a8dacddae4dc980bfac24afc7 (patch) | |
tree | 08953da2d888b7041436e28ef4a8fa401e61163b /gcc/output.h | |
parent | 865ff07f1e5e1190dbdb1b1a15a30e0665c0e7ce (diff) | |
download | gcc-9b6402f5b307410a8dacddae4dc980bfac24afc7.tar.gz |
x
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13994 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/output.h')
-rw-r--r-- | gcc/output.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/output.h b/gcc/output.h index 8722b647590..749043b38fa 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -134,8 +134,9 @@ extern int in_text_section PROTO((void)); #ifdef TREE_CODE /* Tell assembler to change to section NAME for DECL. If DECL is NULL, just switch to section NAME. - If NAME is NULL, get the name from DECL. */ -extern void named_section PROTO((tree, char *)); + If NAME is NULL, get the name from DECL. + If RELOC is 1, the initializer for DECL contains relocs. */ +extern void named_section PROTO((tree, char *, int)); /* Tell assembler to switch to the section for function DECL. */ extern void function_section PROTO((tree)); @@ -429,3 +430,14 @@ extern int sdb_begin_function_line; #ifdef BUFSIZ extern FILE *asm_out_file; #endif + +/* Decide whether DECL needs to be in a writable section. RELOC is the same + as for SELECT_SECTION. */ + +#define DECL_READONLY_SECTION(DECL,RELOC) \ + (TREE_READONLY (DECL) \ + && ! TREE_THIS_VOLATILE (DECL) \ + && DECL_INITIAL (DECL) \ + && (DECL_INITIAL (DECL) == error_mark_node \ + || TREE_CONSTANT (DECL_INITIAL (DECL))) \ + && ! (RELOC && (flag_pic || DECL_ONE_ONLY (DECL)))) |