lkml.org 
[lkml]   [2016]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] ARM: mm: hide __start_rodata_section_aligned for non-debug builds
From
On 16 February 2016 at 17:34, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 16 February 2016 17:12:52 Ard Biesheuvel wrote:
>> > +#ifdef CONFIG_DEBUG_RODATA
>> > /*
>> > * Without CONFIG_DEBUG_ALIGN_RODATA, __start_rodata_section_aligned will
>> > * be the first section-aligned location after __start_rodata. Otherwise,
>> > * it will be equal to __start_rodata.
>> > */
>> > __start_rodata_section_aligned = ALIGN(__start_rodata, 1 << SECTION_SHIFT);
>> > +#endif
>> >
>>
>> Does
>>
>> PROVIDE(__start_rodata_section_aligned = xxx);
>>
>> do the trick as well? If it does, it's a bit cleaner.
>>
>
> I would assume not, as the problem is that SECTION_SHIFT is a macro that
> is not defined when the MMU is disabled.
>

I just tested it myself, and it in fact does work.

PROVIDE() means the expression is evaluated lazily, and SECTION_SHIFT
is just an undefined identifier in the linker script scope if the
preprocessor does not define it.

Anyway, I don't have a strong preference, so ack either way.

\
 
 \ /
  Last update: 2016-02-16 17:41    [W:0.052 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site