Use __func__ rather than __FUNCTION__

We already use C99's __func__ in places, use it more generally.  This
patch doesn't change uses in the testsuite.  I've also left one in
gold.h that is protected by GCC_VERSION < 4003.  If any of the
remaining uses bothers anyone I invite patches.

bfd/
	* bfd-in.h: Replace __FUNCTION__ with __func__.
	* elf32-bfin.c: Likewise.
	* elfnn-aarch64.c: Likewise.
	* elfxx-sparc.c: Likewise.
	* bfd-in2.h: Regenerate.
gas/
	* config/tc-cris.c: Replace __FUNCTION__ with __func__.
	* config/tc-m68hc11.c: Likewise.
	* config/tc-msp430.c: Likewise.
gold/
	* dwp.h: Replace __FUNCTION__ with __func__.
	* gold.h: Likewise, except for use inside GCC_VERSION < 4003.
ld/
	* emultempl/pe.em: Replace __FUNCTION__ with __func__.
	* emultempl/pep.em: Likewise.
	* pe-dll.c: Likewise.
This commit is contained in:
Alan Modra
2023-01-12 16:46:23 +10:30
parent 2070fc67ba
commit 4981a31d52
13 changed files with 33 additions and 34 deletions

View File

@ -1421,7 +1421,7 @@ pe_find_data_imports (const char *symhead,
char *impname;
if (pe_dll_extra_pe_debug)
printf ("%s:%s\n", __FUNCTION__, undef->root.string);
printf ("%s:%s\n", __func__, undef->root.string);
strcpy (name, undef->root.string);
impname = name - (sizeof "__imp_" - 1);
@ -3501,7 +3501,7 @@ pe_implied_import_dll (const char *filename)
if (pe_dll_extra_pe_debug)
printf ("%s %s: 0x%08lx-0x%08lx (0x%08lx)\n",
__FUNCTION__, sec_name, (unsigned long) vaddr,
__func__, sec_name, (unsigned long) vaddr,
(unsigned long) (vaddr + vsize), (unsigned long) flags);
}
else if (strcmp(sec_name,".rdata") == 0)
@ -3511,7 +3511,7 @@ pe_implied_import_dll (const char *filename)
if (pe_dll_extra_pe_debug)
printf ("%s %s: 0x%08lx-0x%08lx (0x%08lx)\n",
__FUNCTION__, sec_name, (unsigned long) vaddr,
__func__, sec_name, (unsigned long) vaddr,
(unsigned long) (vaddr + vsize), (unsigned long) flags);
}
else if (strcmp (sec_name,".bss") == 0)
@ -3521,7 +3521,7 @@ pe_implied_import_dll (const char *filename)
if (pe_dll_extra_pe_debug)
printf ("%s %s: 0x%08lx-0x%08lx (0x%08lx)\n",
__FUNCTION__, sec_name, (unsigned long) vaddr,
__func__, sec_name, (unsigned long) vaddr,
(unsigned long) (vaddr + vsize), (unsigned long) flags);
}
}
@ -3579,7 +3579,7 @@ pe_implied_import_dll (const char *filename)
if (pe_dll_extra_pe_debug)
printf ("%s dll-name: %s sym: %s addr: 0x%lx %s\n",
__FUNCTION__, dllname, erva + name_rva,
__func__, dllname, erva + name_rva,
(unsigned long) func_rva, is_data ? "(data)" : "");
}
@ -3616,7 +3616,7 @@ pe_implied_import_dll (const char *filename)
if (pe_dll_extra_pe_debug)
printf ("%s dll-name: %s sym: %s addr: 0x%lx %s\n",
__FUNCTION__, dllname, erva + name_rva,
__func__, dllname, erva + name_rva,
(unsigned long) func_rva, is_data ? "(data)" : "");
}
}