diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-19 07:55:48 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-19 07:55:48 +0000 |
commit | 7b4a38a6036e7a17bf0c302f77c31a6a27ab0ca9 (patch) | |
tree | 4ddec3992557b6c2d8d93182967d4ae32a004621 /gcc/varasm.c | |
parent | 6a30c708faaf739f972849a41f01c2a3ab640c43 (diff) | |
download | gcc-7b4a38a6036e7a17bf0c302f77c31a6a27ab0ca9.tar.gz |
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53615 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index eb570815253..797b67689e5 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1207,7 +1207,7 @@ assemble_start_function (decl, fnname) const char *p; char *name; - STRIP_NAME_ENCODING (p, fnname); + p = (* targetm.strip_name_encoding) (fnname); name = permalloc (strlen (p) + 1); strcpy (name, p); @@ -1527,7 +1527,7 @@ assemble_variable (decl, top_level, at_end, dont_output_data) const char *p; char *xname; - STRIP_NAME_ENCODING (p, name); + p = (* targetm.strip_name_encoding) (name); xname = permalloc (strlen (p) + 1); strcpy (xname, p); first_global_object_name = xname; @@ -1786,7 +1786,7 @@ assemble_name (file, name) const char *real_name; tree id; - STRIP_NAME_ENCODING (real_name, name); + real_name = (* targetm.strip_name_encoding) (name); id = maybe_get_identifier (real_name); if (id) @@ -5477,7 +5477,7 @@ default_unique_section (decl, reloc) plen = strlen (prefix); name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - STRIP_NAME_ENCODING (name, name); + name = (* targetm.strip_name_encoding) (name); nlen = strlen (name); string = alloca (nlen + plen + 1); @@ -5535,3 +5535,13 @@ default_elf_select_rtx_section (mode, x, align) mergeable_constant_section (mode, align, 0); } + +/* By default, we do nothing for encode_section_info, so we need not + do anything but discard the '*' marker. */ + +const char * +default_strip_name_encoding (str) + const char *str; +{ + return str + (*str == '*'); +} |