This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: About the gcc Warning: setting incorrect section attributes for .note


Hi Adam,
	It's OK. Thanks. 



Best Regards,
Edison

-----Original Message-----
From: Adam Nemet [mailto:anemet@caviumnetworks.com] 
Sent: 2008年5月22日 15:03
To: XU SHENG
Cc: gcc@gcc.gnu.org
Subject: Re: About the gcc Warning: setting incorrect section attributes for .note

"XU SHENG" <Sheng.Xu@alcatel-lucent.com> writes:
> 	int priv_dat  __attribute__ ((section(".note"))) = MAGIC;
>
...
>
> 	It's clear to me that only section marked attribute with the startup 
> of ".note" can be compiled to section with type SHT_NOTE in ELF file. 
> Then only problem is assembler in gcc assumed ".note" section as "aw" 
> (allocate/write) as default property, but actually, the .note section 
> can be only marked with "a" (note section is readonly). If I modify 
> the temporary .s export by gcc assembler by delete "w" property, the 
> warning is disappeared.

Did you try making priv_dat const?

Adam


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