Find the answer to your Linux question:
Results 1 to 4 of 4
plz check this link below which narrates the detail Understanding ELF using readelf and objdump www(dot)linuxforums(dot)org/articles/understanding-elf-using-readelf-and-objdump_125.html In the above link i noticed there are two "LOAD" segments in the Program ...
  1. #1
    Just Joined!
    Join Date
    Jan 2007
    Posts
    3

    Regarding Program Headers in ELF file

    plz check this link below which narrates the detail Understanding ELF using readelf and objdump

    www(dot)linuxforums(dot)org/articles/understanding-elf-using-readelf-and-objdump_125.html

    In the above link i noticed there are two "LOAD" segments in the Program Headers, can any one plz tell me why there are two LOAD entries? and can i tweak the linker script to club both of then into one LOAD?

  2. #2
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,116
    Hi.

    I don't know much about the details, but segment 02 is marked "Read" and "Execute", and 03 is marked "Read" and "Write". That seems like a good reason to have separate segments.

    If you combined them (somehow, I don't know the mechanics), it seems you'd have to mark the combined segment RWE, which suggests a certain amount of risk. I'm quite conservative about safety, so I wouldn't do that.

    Why would you want to combine them? ... cheers, drl

    ( The article is at Understanding ELF using readelf and objdump Linux article )
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  3. #3
    Just Joined!
    Join Date
    Jan 2007
    Posts
    3
    thanks for the reply, basically its a design constraint where i should generate only one LOAD segment and i am ok to set the attributes to RWE.

  4. #4
    Just Joined!
    Join Date
    Jan 2007
    Posts
    3
    i have already went through GNU LD manuals but i dint get any clue for my problem, even i googled a lot to find any sample linker commands which speaks how to address my present scenario.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...