Bug 6342
| Summary: | Shared library compiled without PIC | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Powertools | Reporter: | andrewem |
| Component: | libpcap | Assignee: | Jeff Johnson <jbj> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.1 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2000-02-17 19:51:42 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
andrewem
1999-10-25 16:42:33 UTC
assigning to owner of package. Tim The problem affects all architechtures, but is troublesome on ARM and PowerPC. The problem stems from relocs in the text segment. In a shared library, you cannot do the reloc because then it would screw up everyone sharing that library. On some architectures (like x86), this is handled transparently by the dynamic linker/loader. In this case, the text segment is copied, made writeable, and then the reloc is done. Of course the library is no longer really shared as there are now multiple images in memory :( This can be implimented to some extent on ARM as well, except that the reloc can't be over 32 MB (PC24 reloc = 26 bit offset, 4 byte aligned) as that's the largest immediate offset allowed. So it isn't a reliable kludge. On the other hand, PIC uses references to the GOT and PLT (PC32 relocs) which solves the problem entirely on all architechtures. [Perl is also an offender, as libperl.a and DynaLoader.a are not PIC, but are linked by dynamically loaded modules like mod_perl.] Summary: shared libraries and dynmaically loaded modules should only contain and be linked to PIC code. Thanks, fixed. |