This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
.bss segment alignment
- From: "Wehrer, Michael J." <Michael dot Wehrer at alcoa dot com>
- To: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 22 Apr 2004 13:06:23 -0400
- Subject: .bss segment alignment
Help,
I am having a problem with an application that calls munmap to unmap memory assigned to a variable in the .bss segment. unmap fails with a status of Invalid argument. I believe the reason for the failure is that the variable is not aligned on a page boundary.
An objdump of the binar file shows the following information for the variable:
0805a9e0 g O .bss 00001000 vaicom_
The variable in question is created by g77 in a block data program. It is then linked together with gcc modules.
Is there a way to tell the g77/gcc compiler or linker that this variable must start on a page boundary within the .bss segment? I have tried everthing I can think of. This works on Tru64UNIX with the standard f77/cc compiler but does not work on Red Hat 9.0 for i386.
Sincerely yours,
Mike Wehrer