LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2021, 08:54 AM   #16
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,660
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941

Actually, "position independent code" does not require "relocation" in the traditional sense, and that is the point. It requires that some CPU register point to the location (in virtual memory ...) where the code has been loaded, and all references are relative to that register's current value. The code could be "binary copied" to some other place in memory and, so long as the CPU register's value is once again correct, it will continue to run normally.

Non-position-independent code contains (virtual ...) memory references which must be resolved by the operating system's "loader" before the program begins to run, and it cannot be moved elsewhere. The program-file specifies where these memory references are located, and the loader "fixes them up" before the program starts.

Last edited by sundialsvcs; 12-14-2021 at 08:55 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Unknown symbol __fentry__ (err 0)" - loading compiled module on compiled kernel 3.18 Jason_25 Linux - Kernel 1 12-25-2014 05:45 AM
Compiled program not showing up as compiled and not able to run. hjoshuaj Linux - Newbie 3 03-27-2014 05:49 AM
LXer: Absolute Linux is an absolute winner LXer Syndicated Linux News 0 08-07-2007 06:32 PM
iptables and dynamic ip adresses (use of a dyndns service) markus1982 Linux - Security 6 09-02-2004 09:27 AM
How do I forward IP Adresses? teeno Linux - Networking 2 07-16-2001 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration