This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Using ld with -N


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]