This is the mail archive of the
mailing list for the binutils project.
Re: MEMORY attributes in linker script
- From: Cary Coutant <ccoutant at gmail dot com>
- To: James Murray <james at nscc dot info>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 17 Apr 2015 11:04:36 -0700
- Subject: Re: MEMORY attributes in linker script
- Authentication-results: sourceware.org; auth=none
- References: <1429277274 dot 12331 dot 23 dot camel at jsm3>
> However, setting that attribute does not actually set the generated
> section attributes in the linker output. I assumed that it would.
> Somewhere else (can't find the link now) it said that the section
> attributes are checked but ignored?
The MEMORY block in the linker script doesn't define a section or
segment; it describes a region of memory that's available for
placement of sections. If you specify attributes, the linker uses them
to decide whether a section is eligible to be placed in that memory
region, but it's the attributes of the sections themselves that
determine the attributes of the output section.