mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
* som.c (som_begin_writing): Align text in all executables to
make HPUX kernel happy. Fixes strip/objcopy for shared executables.
This commit is contained in:
@ -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)
|
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
|
* som.c (som_begin_writing): Account for alignment needs of
|
||||||
|
@ -2980,8 +2980,12 @@ som_begin_writing (abfd)
|
|||||||
/* Demand paged executables have each space aligned to a
|
/* Demand paged executables have each space aligned to a
|
||||||
page boundary. Sharable executables (write-protected
|
page boundary. Sharable executables (write-protected
|
||||||
text) have just the private (aka data & bss) space aligned
|
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
|
if (abfd->flags & D_PAGED
|
||||||
|
|| (subsection->flags & SEC_CODE)
|
||||||
|| ((abfd->flags & WP_TEXT)
|
|| ((abfd->flags & WP_TEXT)
|
||||||
&& (subsection->flags & SEC_DATA)))
|
&& (subsection->flags & SEC_DATA)))
|
||||||
current_offset = SOM_ALIGN (current_offset, PA_PAGESIZE);
|
current_offset = SOM_ALIGN (current_offset, PA_PAGESIZE);
|
||||||
|
Reference in New Issue
Block a user