[coreboot] r813 - coreboot-v3/lib
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Sun Aug 24 14:20:53 CEST 2008
On 24.08.2008 14:03, Stefan Reinauer wrote:
> Carl-Daniel Hailfinger wrote:
>
>> On 24.08.2008 13:29, svn at coreboot.org wrote:
>>
>>
>>> Author: stepan
>>> Date: 2008-08-24 13:29:11 +0200 (Sun, 24 Aug 2008)
>>> New Revision: 813
>>>
>>> Modified:
>>> coreboot-v3/lib/lar.c
>>> Log:
>>> needs to be const, or the segment checker will bail out. (trivial)
>>> Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
>>> Acked-by: Stefan Reinauer <stepan at coresystems.de>
>>>
>>>
>>>
>>> Modified: coreboot-v3/lib/lar.c
>>> ===================================================================
>>> --- coreboot-v3/lib/lar.c 2008-08-24 07:08:17 UTC (rev 812)
>>> +++ coreboot-v3/lib/lar.c 2008-08-24 11:29:11 UTC (rev 813)
>>> @@ -31,7 +31,7 @@
>>> #define ntohl(x) (x)
>>> #endif
>>>
>>> -static const char *algo_name[] = {
>>> +static const char * const algo_name[] = {
>>> "none",
>>> "lzma",
>>> "nrv2b",
>>>
>>>
>>>
>> Interesting. The checker didn't complain here. Which gcc are you using?
>> I'm using gcc 4.2.1.
>>
>>
> This happened on a box with 3.4.6
>
OK, that old gcc version is not smart enough to to see that nobody
writes to algo_name. It also doesn't have -funit-at-a-time on by default
which would make it smarter.
>> By the way, can we officially require at least gcc 4.1? Otherwise,
>> compiling RAMinit won't work reliably if at all.
>>
> What's the problem with pre-4.1?
>
-funit-at-a-time is off by default before 4.1.
__attribute__((externally_visible)) doesn't work before 4.1. -combine
seems to be a new feature of 4.1 and we rely on it to get a reliably
working initram.
Regards,
Carl-Daneil
--
http://www.hailfinger.org/
More information about the coreboot
mailing list