Plan 9 from Bell Labs’s /usr/web/sources/patch/sorry/libmach-elf/notes

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Thu Feb 3 10:33:26 EST 2005 rsc
    I agree that the right thing to do is use
    the phdr info instead of the shdr.  The shdr
    is only there as a courtesy, while the phdr
    is required for the binary to be loaded by the OS.
    However, I'd prefer not to use constant offsets
    into the phdr.  There are type bits in the phdr that
    can be used to figure out which section is the 
    text, which is the data, and which is the symbols.
    See http://cvs.pdos.lcs.mit.edu/cvs/plan9/src/libmach/elf.c?rev=HEAD
    for how I parse the ELF files from Linux and FreeBSD.
    
    Russ


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].