From: aoki@faerie.CS.Berkeley.EDU (Paul M. Aoki)
Subject: my GOT runneth over
Date: 7 Jan 1994 22:38:11 GMT [thread overview]
Message-ID: <2gko8j$hb0@agate.berkeley.edu> (raw)
let's take the following situation (purely hypothetical, of
course :-) ...
i am running dec osf/1 1.3 on a ds3000/300.
i have a huge, static, initialized array of error messages.
the final ld for my program barfs, complaining that
gp relocation out-of-range for small data or bss by,
<foo> in the positive direction,
<bar> in the negative direction.
gp relocation out-of-range errors have occured and bad object file produced (corrective action must be taken)
and, oddly enough, if i zap most of the error message array
this does not occur.
the various hardcopy documents (calling standard for axp systems,
programmer's guide) suggest that i should be able to use the -G
option, so beloved of MIPS/ULTRIX programmers, to adjust what's
being stuck into the .sdata and .sbss segments. however, i have
noticed that
(1) -G isn't documented in the cc or ld man pages 8-O
(2) cc doesn't seem to pass it through (though it accepts
the option)
(3) osf/1 doesn't seem to provide -G 0 (no gp) libraries
like MIPS/ULTRIX, which isn't really relevant but is rather
suggestive that you aren't supposed to play gp games :-)
after a bit of playing with ld -G i *still* couldn't get a good
object, so i did a cheesy hack -- i stuck the strings into the
array as fixed-length char arrays of >8 bytes. this is obviously
suboptimal in several respects.
what is the "right" way to deal with this?
--
Paul M. Aoki | CS Div., Dept. of EECS, UCB | aoki@postgres.Berkeley.EDU
| Berkeley, CA 94720 | ...!uunet!ucbvax!aoki
reply other threads:[~1994-01-07 22:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox