Re: linker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 1 May 2011, Patrick Dupre wrote:

> It is a perl application calling my own c routines.
> I made tons of them but here I get:
>
> Can't load 
> '/home/pdupre/perl_lib/i386-linux-thread-multi/auto/Absor_satur/Absor_satur.so' 
> for module Absor_satur: 
> /home/pdupre/perl_lib/i386-linux-thread-multi/auto/Absor_satur/Absor_satur.so: 
> cannot restore segment prot after reloc: Permission denied at 
> /usr/lib/perl5/DynaLoader.pm line 200.
> at ./Profile.pl line 22


It looks like you might have run afoul of an anti-stack-smashing mechanism.
One idea is to mark some parts of memory non-executable.
That limits the places to where evil folks can do a pseudo-return.
Another idea is to rearrange the places where shared objects are stored.
This limits the information avaiable to an evil-doer.
An unrelocateable shared object sometimes gets evicted.

> I do not know how to debug this !

>>> I wish to link several .o files to make only one .o file not executable
>>> (it will relinked later). I would like to first make a prelinked file 
>>> easier to then link
>>> them to the excutable file (ie. with a main).
>> 
>> ld -r can do that, but are you sure you don't just want to
>> stick all the .o files in an archive with ar and link with
>> that static library later?

I've read the linking with -r is *not* the same as just "concatenating",
but I'm not sure what the difference is.

You can make an archive.a and use -whole when listing it for inclusion.

-- 
Michael   hennebry@xxxxxxxxxxxxxxxxxxxxx
"Pessimist: The glass is half empty.
Optimist:   The glass is half full.
Engineer:   The glass is twice as big as it needs to be."
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux