6.4.2 hppa info tables question

Joe Buehler aspam at cox.net
Tue Jul 3 10:47:20 EDT 2007


In getting the registerised build up and running for
hppa 6.4.2, I have run into a bit of a road block.

I'm puzzling over the mangler and what is in the
_info tables.  Here is an example of what gcc emits:

	.SPACE $PRIVATE$
	.SUBSPA $DATA$

	.align 4
GHCziConc_lvl2_srt
	.word	DataziTypeable_lgo_closure
	.word	DataziTypeable_zdwmkTyCon_closure
	.word	GHCziConc_lvl_closure
	.word	GHCziConc_lvl1_closure

...snip...

	.SPACE $PRIVATE$
	.SUBSPA $DATA$

	.align 4
s54Q_info
	.word	GHCziConc_lvl2_srt
	.word	0
	.word	2359301

The mangler normally would replace the srt pointer in the info
table with a relative offset from the info table.  However,
the info table gets moved to the code space, in front of
its associated function, and I think the offset computation
is problematic for hppa.

>From what I surmise, the addresses in hppa are not straight
32 bit indices -- the top 2 bits are used to select a "space"
register, and this causes the linker to emits lots and lots of
warnings regarding the offset computation.  E.g.:

/afs/hekimian.com/@sys/local/hppa1.0-hp-hpux11.00/bin/ld: (Warning) Quadrant change in relocatable expression file /home/project-releases/tmp/ghc-6.4.2/libraries/base/libHSbase.a(Types.o).
/afs/hekimian.com/@sys/local/hppa1.0-hp-hpux11.00/bin/ld: (Warning) Quadrant change in relocatable expression in subspace $CODE$ at offset 0x4f44 in file /home/plibraries/base/libHSbase.a(Types.o).

A comment in the mangler indicates that GHC went to offsets in info
tables instead of pointers for PIC reasons.  This doesn't make a
whole lot of sense to me however -- the srt, srtd and btm tables
are in the data segment.  I would expect any offset to be to text
segment objects only.

Are these tables also supposed to be moved to text by the mangler?

Joe Buehler



More information about the Cvs-ghc mailing list