Bug 21888 - bootstrap failure with linker relaxation enabled
bootstrap failure with linker relaxation enabled
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: target
4.1.0
: P2 normal
: 3.4.5
Assigned To: Richard Henderson
: build, wrong-code
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-02 21:38 UTC by Richard Henderson
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target: alpha-linux
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Henderson 2005-06-02 21:38:38 UTC
When bootstrapping for EV4, pp_base_set_prefix is miscompiled.  An fnop is
emitted between the two insns of the initial ldgp pair.

The abi for "standard pv usage", implied by ".prologue 1", requires that this
instruction pair be sequential.  Which allows the linker to alter "jsr foo"
into "bsr foo+8".

With the additional fnop, a bsr pp_base_set_prefix+8 results in the gp being
corrupted.  Hilarity ensues.
Comment 1 CVS Commits 2005-06-04 19:23:58 UTC
Subject: Bug 21888

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-06-04 19:23:54

Modified files:
	gcc            : ChangeLog 
	gcc/config/alpha: alpha.c 

Log message:
	PR target/21888
	* config/alpha/alpha.c (alpha_align_insns): Don't insert nops
	until we've passed initial ldgp.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9037&r2=2.9038
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/alpha/alpha.c.diff?cvsroot=gcc&r1=1.426&r2=1.427

Comment 2 CVS Commits 2005-06-04 19:25:56 UTC
Subject: Bug 21888

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	rth@gcc.gnu.org	2005-06-04 19:25:48

Modified files:
	gcc            : ChangeLog 
	gcc/config/alpha: alpha.c 

Log message:
	PR target/21888
	* config/alpha/alpha.c (alpha_align_insns): Don't insert nops
	until we've passed initial ldgp.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.278&r2=2.7592.2.279
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/alpha/alpha.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.408.8.3&r2=1.408.8.4

Comment 3 CVS Commits 2005-06-04 19:27:50 UTC
Subject: Bug 21888

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rth@gcc.gnu.org	2005-06-04 19:27:34

Modified files:
	gcc            : ChangeLog 
	gcc/config/alpha: alpha.c 

Log message:
	PR target/21888
	* config/alpha/alpha.c (alpha_align_insns): Don't insert nops
	until we've passed initial ldgp.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.875&r2=2.2326.2.876
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/alpha/alpha.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.342.4.14&r2=1.342.4.15

Comment 4 Richard Henderson 2005-06-04 19:28:13 UTC
Fixed.