Re: .rodata section defined as Writeable as well as Text program header
> Another animality I see when compiling current (2005-12-27) glibc sources
> by gcc 4.1 on RHEL4/PowerPC machine: in libm.so.6 library, .rodata is
> defined as Writeable, and so Text program header does.
>  .rodata PROGBITS 00040588 040588 037508 00 WA 0
> Any ideas why it happens?
Output sections inherit the attributes of the input sections that were
mapped onto them. Therefore the most likely cause is that one or more
input sections with the writable flag (SHF_WRITE) set are being mapped
into the .rodata output section. Find out which sections these are (eg
using the -Map linker switch) and then fix them.