[Top] [All Lists]

Re: [PATCH] MIPS: Octeon: add option to ignore PT_NOTE section

To: Florian Fainelli <>
Subject: Re: [PATCH] MIPS: Octeon: add option to ignore PT_NOTE section
From: Philby John <>
Date: Sun, 17 Apr 2011 10:46:37 +0530
Cc: David Daney <>,
In-reply-to: <>
Original-recipient: rfc822;
References: <1302710833.14458.1.camel@localhost.localdomain> <> <> <> <> <> <>
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b2 Thunderbird/3.1.7
On 04/16/2011 09:21 PM, Florian Fainelli wrote:
> Hello,
> Le 16/04/2011 17:21, Philby John a écrit :
>> On 04/15/2011 09:57 PM, David Daney wrote:
>>> On 04/15/2011 01:55 AM, Philby John wrote:
>>>> On 04/15/2011 01:54 PM, Florian Fainelli wrote:
>>>>> Hello,
>>>>> On Wednesday 13 April 2011 19:38:02 David Daney wrote:
>>>>>> On 04/13/2011 09:07 AM, philby john wrote:
>>>>>>> From: Philby John<>
>>>>>> ^^^^^^^^ I believe that statement to be not entirely correct.
>>>>>> Perhaps you should change it to something like:
>>>>>> From: David Daney<>
>>>>>>> Date: Wed, 13 Apr 2011 20:46:32 +0530
>>>>>>> Subject: [PATCH] MIPS: Octeon: add option to ignore PT_NOTE section
>>>>>>> Some early Octeon bootloaders cannot process PT_NOTE program
>>>>>>> headers as reported in numerous sections of the web, here is
>>>>>>> an example
>>>>>>> Loading usually fails with such an error ...
>>>>>>> Error allocating memory for elf image!
>>>>>>> The work around usually is to strip the .notes section by using
>>>>>>> such a command $mips-gnu-strip -R .notes vmlinux -o fixed-vmlinux
>>>>>>> It is expected that the vmlinux image got after compilation be
>>>>>>> bootable. Add a Kconfig option to ignore the PT_NOTE section.
>>>>> Do we really want this to be in the kernel? In my opinion, this is a
>>>>> fixup
>>>>> which distributions should be aware of, but not necessarily take
>>>>> place here in
>>>>> the kernel Makefiles.
>>>> You are right in one way. But as an OS vendor company we will
>>>> definitely
>>>> include this patch in our distribution. This incident has been reported
>>>> many a times and its a pain to see the image not boot up, throw up an
>>>> error, with the user having to search the work around on the web. What
>>>> we are trying to do is save all that trouble. If it can be fixed why
>>>> not
>>>> fix it.
>>> I don't care one way or another.  We too (perhaps one and the same...)
>>> provide kernels to our SDK customers with the patch applied.
>>> An alternative approach would be to put the $(CROSS_COMPILE)strip
>>> command into the arch/mips/Makefile.
>> I doubt that's any good, strip also removes debug symbols along with the
>> notes section and I am not aware of a specific command to strip just the
>> PT_NOTE section. Just these lines of code seem to get the job done
>> though ...
>>        NOTES :text :note
>> +#else
>> +    NOTES :text
>> +#endif
> strip can be told to only strip a particular section, e.g:
> $(TARGET_CROSS)strip -R .notes
But this strips the debug symbols as well, from what I saw. Problems
with the strip command? Anyways, I won't be pursuing this matter any
further given the limited scope of its inclusion.


<Prev in Thread] Current Thread [Next in Thread>