Skip to content
Snippets Groups Projects
  • Avi Kivity's avatar
    fd3dcf95
    elf: ignore EH_FRAME segments · fd3dcf95
    Avi Kivity authored
    PT_GNU_EH_FRAME segments are contained within PT_LOAD segments, and
    so need not be loaded.  Moreover, when we load a segment, we align
    it to page boundaries; this overwrites previous contents.  Does
    serious damage with small objects (like tst-dir.so) - overwriting
    the main function.
    
    Fix by ignoring EH_FRAME segments (libunwind will later re-discover
    them when iterating over the objects's phdrs).
    fd3dcf95
    History
    elf: ignore EH_FRAME segments
    Avi Kivity authored
    PT_GNU_EH_FRAME segments are contained within PT_LOAD segments, and
    so need not be loaded.  Moreover, when we load a segment, we align
    it to page boundaries; this overwrites previous contents.  Does
    serious damage with small objects (like tst-dir.so) - overwriting
    the main function.
    
    Fix by ignoring EH_FRAME segments (libunwind will later re-discover
    them when iterating over the objects's phdrs).