* Using ld with -N
@ 2001-04-05 19:00 Daniel Olson
2001-04-05 19:34 ` Alexandre Oliva
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Olson @ 2001-04-05 19:00 UTC (permalink / raw)
To: gcc-help
Hi all,
I'm at the end of my rope on this one, so I hope someone here can help. I
am working on a linux port of zsnes. Unfortunatly, due to the way the code
is structured, I need to have write access to the codeseg (.text). I have
tried many ways to accomplish this, mprotect, linker scripts, hexediting the
elf binary, etc, but none of them quite worked. The only thing that worked
right was adding -N to the link flags. The port works perfectly with -N,
with one exception... when I link in another library, say SDL, I get
undefined references for everything that SDL needs. In other words, it
appears that to use SDL I would have to link with -lX11 and a whole slough
of other libraries. To the best of anyone's knowledge, is there any way
around this? Obviously, I cannot link in all of SDL's libraries, since
everyone compiles their SDL differently. Is there some way I can link with
-N and still have normal linking with external libraries?
Any and all help is very much appreciated
DDOI
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Using ld with -N
2001-04-05 19:00 Using ld with -N Daniel Olson
@ 2001-04-05 19:34 ` Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2001-04-05 19:34 UTC (permalink / raw)
To: Daniel Olson; +Cc: gcc-help
On Apr 6, 2001, "Daniel Olson" <theoddone33@hotmail.com> wrote:
> Is there some way I can link with -N and still have normal linking
> with external libraries?
Since this is a linker issue, rather than a compiler issue, I suppose
you might get better help at one of the binutils mailing lists.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-04-05 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-05 19:00 Using ld with -N Daniel Olson
2001-04-05 19:34 ` Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).