The enclosed fixes Bug gas/1948 on hppa*-*-hpux*. Under HP-UX, common
symbols are supposed to only be defined in the $BSS$ subspace in the
$PRIVATE$ space. There isn't a unique subspace just for common symbols.
In the code in symbols.c that checks for duplicated comm symbols, we
have now_seg = bss_section for the testcase in the bug report.
S_GET_SEGMENT (symbolP) is the BDF segment *COM*. Thus, we never
enter the hunk of code which accepts redefinition of common symbols.
The fix proposed here is to just check to see if now_seg == bss_section.
Tested on hppa2.0w-hp-hpux11.11.
J. David Anglin [hidden email] National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
On Sun, Dec 04, 2005 at 11:43:18PM -0500, John David Anglin wrote:
> > I don't think you need the #if.
> I removed the #if and rechecked the change on hppa2.0w-hp-hpux11.11. I
> also tested the change with a build and check on hppa-unknown-linux with
> no regressions.
IBM OzLabs - Linux Technology Centre