public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: .bss segment alignment
@ 2004-04-22 22:52 Bud Davis
  0 siblings, 0 replies; 2+ messages in thread
From: Bud Davis @ 2004-04-22 22:52 UTC (permalink / raw)
  To: gcc-help; +Cc: Michael.Wehrer

Not to sure if this will help, but you can force a fortran common to a
specific virtual address at link time by passing ld some commands:
 


g77 <usual stuff > -Wl,--defsym -Wl,global01_=0x40200000


with this you know that "COMMON / GLOBAL01 /" will be in a fixed
location.  i have used this in the past to map fortran common to shared
memory using shmat to a fixed address.

you can probably force anything to be anywhere with ld commands, but I
have no clue on the details :)


regards,
bud davis

^ permalink raw reply	[flat|nested] 2+ messages in thread

* .bss segment alignment
@ 2004-04-22 17:06 Wehrer, Michael J.
  0 siblings, 0 replies; 2+ messages in thread
From: Wehrer, Michael J. @ 2004-04-22 17:06 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-22 22:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-22 22:52 .bss segment alignment Bud Davis
  -- strict thread matches above, loose matches on Subject: below --
2004-04-22 17:06 Wehrer, Michael J.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).