Re: gas: add visibility support using GNU syntax on XCOFF

tc-ppc.c: In function 'ppc_comm':
tc-ppc.c:4560:40: error: 'visibility' may be used uninitialized in this function [-Werror=maybe-uninitialized]

With that fixed we hit lots of segfaults in the ld testsuite.

	PR 22085
bfd/
	* xcofflink.c (xcoff_link_input_bfd): Don't segfault on NULL
	sym_hash.
gas/
	* config/tc-ppc.c (ppc_comm): Init visibility.
This commit is contained in:
Alan Modra
2022-01-13 15:42:13 +10:30
parent c39828d4c9
commit 1ffce3f87d
2 changed files with 6 additions and 3 deletions

View File

@ -4380,7 +4380,7 @@ ppc_comm (int lcomm)
symbolS *lcomm_sym = NULL;
symbolS *sym;
char *pfrag;
unsigned short visibility;
unsigned short visibility = 0;
struct ppc_xcoff_section *section;
endc = get_symbol_name (&name);