diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/ldlang.c | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 81935a4..b863676 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,10 @@ 2019-09-18 Alan Modra <amodra@gmail.com> + * ldlang.c (stricpy, strcut, name_compare): Constify params. + (get_first_input_target): Make return and "target" const. + +2019-09-18 Alan Modra <amodra@gmail.com> + * emultempl/pe.em (after_open): Use bfd_set_filename. * emultempl/pep.em (after_open): Use bfd_set_filename. diff --git a/ld/ldlang.c b/ld/ldlang.c index 8beccd3..76e862a 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -3149,7 +3149,7 @@ get_target (const bfd_target *target, void *data) /* Like strcpy() but convert to lower case as well. */ static void -stricpy (char *dest, char *src) +stricpy (char *dest, const char *src) { char c; @@ -3163,7 +3163,7 @@ stricpy (char *dest, char *src) from haystack. */ static void -strcut (char *haystack, char *needle) +strcut (char *haystack, const char *needle) { haystack = strstr (haystack, needle); @@ -3182,7 +3182,7 @@ strcut (char *haystack, char *needle) Return a value indicating how "similar" they are. */ static int -name_compare (char *first, char *second) +name_compare (const char *first, const char *second) { char *copy1; char *copy2; @@ -3267,10 +3267,10 @@ closest_target_match (const bfd_target *target, void *data) /* Return the BFD target format of the first input file. */ -static char * +static const char * get_first_input_target (void) { - char *target = NULL; + const char *target = NULL; LANG_FOR_EACH_INPUT_STATEMENT (s) { |