aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-xtensa.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+binutils@tbsaunde.org>2016-03-20 01:37:55 -0400
committerTrevor Saunders <tbsaunde+binutils@tbsaunde.org>2016-03-31 07:30:41 -0400
commite4a0c708776681a6839c4335f999e45251e7b991 (patch)
treecf67d12ab29780836e6eba3c6d78700a2e486944 /gas/config/tc-xtensa.c
parente2c7dcae81a7da1353b7c3d5db210fca479c9c4c (diff)
downloadgdb-e4a0c708776681a6839c4335f999e45251e7b991.zip
gdb-e4a0c708776681a6839c4335f999e45251e7b991.tar.gz
gdb-e4a0c708776681a6839c4335f999e45251e7b991.tar.bz2
make xtensa_section_rename () take const char *
Xtensa uses it in several macros passing it a literal string, so its convenient for the argument type to be const char *. However some of the code in symbols.c seems to assume tc_canonicalize_symbol_name () will return a non const pointer, and some other target's implementations even modify the argument, so it seems best to return a char * which means casting away const on the argument when we return it instead of another string. gas/ChangeLog: 2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * config/tc-xtensa.c (struct rename_section_struct): Make old_name const. (xtensa_section_rename): Make argument type const char *. * config/tc-xtensa.h (xtensa_section_rename): Adjust.
Diffstat (limited to 'gas/config/tc-xtensa.c')
-rw-r--r--gas/config/tc-xtensa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index abefdd2..fe16659 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -13104,7 +13104,7 @@ copy_expr (expressionS *dst, const expressionS *src)
struct rename_section_struct
{
- char *old_name;
+ const char *old_name;
char *new_name;
struct rename_section_struct *next;
};
@@ -13177,7 +13177,7 @@ build_section_rename (const char *arg)
char *
-xtensa_section_rename (char *name)
+xtensa_section_rename (const char *name)
{
struct rename_section_struct *r = section_rename;
@@ -13187,5 +13187,5 @@ xtensa_section_rename (char *name)
return r->new_name;
}
- return name;
+ return (char *) name;
}