This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v5] Fix dynamic linker issue with bind-now


On Wed, Jul 15, 2015 at 11:20 AM, Petar Jovanovic
<petar.jovanovic@rt-rk.com> wrote:
>
>>> +static int __attribute__ ((section(".bar"))) bar = 0x12345678;
>> Please make "bar" readonly to avoid writable and executable segment.
>
> As "static int const __attribute__ ..."?
> In that case, bar is removed from the sections list, likely due to some optimizations.
>

Please find a way.  You can put

int const __attribute__ ((section(".bar"))) bar = 0x12345678;

in a separate file.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]