|
|
|
Re: [PATCH] Ignore PT_NOTE program headers with offset 0. | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On Fri, Mar 16, 2007 at 10:10:04AM +0000, Ian Campbell wrote:
> There is a binutils bug which causes PT_NOTE segments to have an offset of
> zero (http://sourceware.org/bugzilla/show_bug.cgi?id=594). The fix has not
> made it into any release binutils, although several distributions have
> backported it.
>
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
> ---
>
> kexec/kexec-elf.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kexec/kexec-elf.c b/kexec/kexec-elf.c
> index 63f5b4c..ce457f2 100644
> --- a/kexec/kexec-elf.c
> +++ b/kexec/kexec-elf.c
> @@ -676,7 +676,7 @@ static int build_mem_notes(const char *buf, off_t len, struct mem_ehdr *ehdr)
> note_start = note_end = NULL;
> for(i = 0; !note_start && (i < ehdr->e_phnum); i++) {
> struct mem_phdr *phdr = &ehdr->e_phdr[i];
> - if (phdr->p_type == PT_NOTE) {
> + if (phdr->p_type == PT_NOTE && phdr->p_offset) {
I think a comment here will help understanding why to check phdr->p_offset
being non-zero.
That bug seemed to be for a custom setup. Did you ever run into this bug
while building kernels?
Thanks
Vivek
_______________________________________________
fastboot mailing list
fastboot@xxxxxxxxxxxxxx
https://lists.osdl.org/mailman/listinfo/fastboot
[Netdev] [Linux Wireless] [Kernel Newbies] [Security] [Linux for Hams] [Netfilter] [Bugtraq] [Photo] [Yosemite] [Yosemite Forum] [MIPS Linux] [ARM Linux] [Linux RAID] [Linux Admin] [Samba] [Linux Media] [Linux Resources]