Article View: gnu.gcc.help
Article #386Compiler for relocatable data segment
From: Tom Stiemerling
Date: Wed, 02 Sep 1992 13:31
Date: Wed, 02 Sep 1992 13:31
20 lines
1347 bytes
1347 bytes
I require a compiler and linker for C (for SPARC) which will indirect all references to variables in the data segment through a base register (resulting in something similar to a segment register in an iX86). Currently the linker assigns absolute addresses for these variables, whereas I would like them to be offset from a pointer to these base of the data segment. This means the data segment is relocatable simply by changing the base pointer. Using PIC does something similar but not quite, sine the global offset table is still assumed to be at a fixed address. I need this for a single address space operating system emulator. Can anyone comment on whther it would be possible to hack gcc to do this? Has anyone tried it? etc. Thanks. -- ## Tom Stiemerling, Research Assistant, Systems Architecture Research Centre, # ## Computer Science Department, City University, Northampton Square, ######### ## London EC1V 0HB, U.K. ### trs@cs.city.ac.uk ### +71 477 8551 ###############
Technical Details
Message-ID:
<1992Sep2.133130.4631@city.cs>Path:
arc1-ca.pugleaf.net!sparky!uunet!pipex!warwick!uknet!doc.ic.ac.uk!citycs!trsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!warwick!uknet!doc.ic.ac.uk!citycs!trs From: trs@cs.city.ac.uk (Tom Stiemerling) Newsgroups: gnu.gcc.help Subject: Compiler for relocatable data segment Message-ID: <1992Sep2.133130.4631@city.cs> Date: 2 Sep 92 13:31:30 GMT Sender: news@city.cs (News) Organization: City University, London Lines: 20