From 142f59f4a9315edb63c6df129a5496e1ca5bd027 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sun, 20 Mar 1994 17:27:51 +0000 Subject: [PATCH] * som.c (som_begin_writing): Align text in all executables to make HPUX kernel happy. Fixes strip/objcopy for shared executables. --- bfd/ChangeLog | 6 ++++++ bfd/som.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ba3dc0cf2e..1fff79b482 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +Sun Mar 20 09:24:36 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * som.c (som_begin_writing): Align text in all executables to + make HPUX kernel happy. Fixes strip/objcopy for shared + executables. + Sat Mar 19 07:06:59 1994 Jeffrey A. Law (law@snake.cs.utah.edu) * som.c (som_begin_writing): Account for alignment needs of diff --git a/bfd/som.c b/bfd/som.c index f17e064899..a355b75f86 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -2980,8 +2980,12 @@ som_begin_writing (abfd) /* Demand paged executables have each space aligned to a page boundary. Sharable executables (write-protected text) have just the private (aka data & bss) space aligned - to a page boundary. */ + to a page boundary. Ugh. Not true for HPUX. + + The HPUX kernel requires the text to always be page aligned + within the file regardless of the executable's type. */ if (abfd->flags & D_PAGED + || (subsection->flags & SEC_CODE) || ((abfd->flags & WP_TEXT) && (subsection->flags & SEC_DATA))) current_offset = SOM_ALIGN (current_offset, PA_PAGESIZE);