mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
It's always an error to try to use sections on an executable; the segments in the phdr are definitive. Unfortunately we cannot drop SHT_NOTE support completely due to a binutils bug which causes kernels to have the offset field of the PT_NOTE phdr set to zero: http://sourceware.org/bugzilla/show_bug.cgi?id=594 This bug is present in binutils 2.17 although some distros have backported the fix. Therefore we simply prefer a PT_NOTE segment if we find one otherwise we still use the SHT_NOTE section (and then the old __xen_guest section). Based on a patch from Jeremy Fitzhardinge. Also added XEN_ELFNOTE_HV_START_LOW to readnotes. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>