PHDRS
{
- /* Single loadable section, RWE. */
- load PT_LOAD FLAGS(7);
+ text PT_LOAD FLAGS(7); /* RWE */
+ note PT_NOTE FLAGS(4); /* R */
}
SECTIONS
. = ALIGN(PAGE_SIZE);
__end_user_text = .;
- } :load = 0
+ } :text = 0
.data : {
*(.data)
}
+ .note : {
+ *(.note)
+ *(.note.*)
+ } :note :text
+
.rodata : {
*(.rodata)
*(.rodata.*)
__start_ex_table = .;
*(.ex_table)
__stop_ex_table = .;
- }
-
- .note : {
- *(.note)
- *(.note.*)
- }
+ } :text
.bss : {
*(.bss)
* 'desc' may be an arbitrary asm construct.
*/
#define ELFNOTE(name, type, desc) \
- .pushsection .note.name ; \
+ .pushsection .note.name, "a", @note ; \
.align 4 ; \
.long 2f - 1f /* namesz */ ; \
.long 4f - 3f /* descsz */ ; \
#else
#define ELFNOTE(name, type, desc) \
- asm (".pushsection .note." #name ";" \
+ asm (".pushsection .note, \"a\", @note;" \
".align 4;" \
".long 2f - 1f;" /* namesz */ \
".long 4f - 3f;" /* descsz */ \