Re: XForms: Nasty pointer bug.

Christopher Sean Hilton (chris@vindaloo.com)
Fri, 29 May 1998 08:03:41 -0400 (EDT)

# To subscribers of the xforms list from Christopher Sean Hilton <chris@vindaloo.com> :

On Thu, 28 May 1998, Steve Lamont wrote:

: # To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
:
: > I realize that and I'm pretty much aware of how to generate a static
: > executable under FreeBSD (``-static'' for gcc -Bstatic for ld). ...
:
: Sorry -- from your original question I couldn't tell how experienced
: you were.

No offense taken, and no apology necessary. Sorry if my reply sounded a
bit sarcastic, I didn't mean it that way.

:
: > ... I get one
: > of two errors trying to create the static version of the program:
: > ld either complains about __DYNAMIC or it complains about
: > _GLOBAL_OFFSET_TABLE_ The __DYNAMIC is possible a FreeBSD issue which I
: > can find out about by looking at the source code for any staticly linked
: > executable in /bin. The _GLOBAL_OFFSET_TABLE_ seems to be a Forms thing.
:
: It's a gcc-ism. This is something caused by the -fpic or (I think)
: the -fPIC options. From the GCC info file:
:
: `-fpic' Generate position-independent code (PIC) suitable for use in a
: shared library, if supported for the target machine. Such code
: accesses all constant addresses through a global offset table
: (GOT). The dynamic loader resolves the GOT entries when the
: program starts (the dynamic loader is not part of GNU CC; it is
: part of the operating system). If the GOT size for the linked
: executable exceeds a machine-specific maximum size, you get an
: error message from the linker indicating that `-fpic' does not
: work; in that case, recompile with `-fPIC' instead. (These
: maximums are 16k on the m88k, 8k on the Sparc, and 32k on the
: m68k and RS/6000. The 386 has no such limit.)
:
: Position-independent code requires special support, and therefore
: works only on certain machines. For the 386, GNU CC supports PIC
: for System V but not for the Sun 386i. Code generated for the
: IBM RS/6000 is always position-independent.
:
: `-fPIC'
: If supported for the target machine, emit position-independent
: code, suitable for dynamic linking and avoiding any limit on the
: size of the global offset table. This option makes a difference
: on the m68k, m88k, and the Sparc.
:
: Position-independent code requires special support, and therefore
: works only on certain machines.
:

Okay, I'll give the pic/PIC compile options a try. Thanks

Chris

--
      __o          "All I was trying to do was get home from work."
    _`\<,_           -Rosa Parks
___(*)/_(*)____.___o____..___..o...________ooO..._____________________
Christopher Sean Hilton                    [chris/at/vindaloo/dot/com]

_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuf2.usuhs.mil or see http://bob.usuf2.usuhs.mil/mailserv/xforms.html XForms Home Page: http://bragg.phys.uwm.edu/xforms List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/