summaryrefslogtreecommitdiff
path: root/ld/emultempl/sh64elf.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/sh64elf.em')
-rw-r--r--ld/emultempl/sh64elf.em27
1 files changed, 12 insertions, 15 deletions
diff --git a/ld/emultempl/sh64elf.em b/ld/emultempl/sh64elf.em
index 83bfe676bb1..0682f5ca980 100644
--- a/ld/emultempl/sh64elf.em
+++ b/ld/emultempl/sh64elf.em
@@ -1,5 +1,5 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
#
@@ -152,7 +152,7 @@ sh64_elf_${EMULATION_NAME}_before_allocation (void)
isec = isec->next)
{
if (isec->output_section == osec
- && isec->_raw_size != 0
+ && isec->size != 0
&& (bfd_get_section_flags (isec->owner, isec)
& SEC_EXCLUDE) == 0)
{
@@ -179,7 +179,7 @@ sh64_elf_${EMULATION_NAME}_before_allocation (void)
isec = isec->next)
{
if (isec->output_section == osec
- && isec->_raw_size != 0
+ && isec->size != 0
&& (bfd_get_section_flags (isec->owner, isec)
& SEC_EXCLUDE) == 0)
{
@@ -283,7 +283,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
isec = isec->next)
{
if (isec->output_section == osec
- && isec->_raw_size != 0
+ && isec->size != 0
&& (bfd_get_section_flags (isec->owner, isec)
& SEC_EXCLUDE) == 0)
{
@@ -310,7 +310,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
isec = isec->next)
{
if (isec->output_section == osec
- && isec->_raw_size != 0
+ && isec->size != 0
&& (bfd_get_section_flags (isec->owner, isec)
& SEC_EXCLUDE) == 0)
{
@@ -363,7 +363,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
isec = isec->next)
{
if (isec->output_section == osec
- && isec->_raw_size != 0
+ && isec->size != 0
&& (bfd_get_section_flags (isec->owner, isec)
& SEC_EXCLUDE) == 0
&& ((elf_section_data (isec)->this_hdr.sh_flags
@@ -388,7 +388,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
/* Make sure we have .cranges in memory even if there were only
assembler-generated .cranges. */
cranges_growth = new_cranges * SH64_CRANGE_SIZE;
- cranges->contents = xcalloc (cranges->_raw_size + cranges_growth, 1);
+ cranges->contents = xcalloc (cranges->size + cranges_growth, 1);
bfd_set_section_flags (cranges->owner, cranges,
bfd_get_section_flags (cranges->owner, cranges)
| SEC_IN_MEMORY);
@@ -403,7 +403,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
return;
}
- crangesp = cranges->contents + cranges->_raw_size;
+ crangesp = cranges->contents + cranges->size;
/* Now pass over the sections again, and make reloc orders for the new
.cranges entries. Constants are set as we go. */
@@ -437,7 +437,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
as containing mixed data, thus already having .cranges
entries. */
if (isec->output_section == osec
- && isec->_raw_size != 0
+ && isec->size != 0
&& (bfd_get_section_flags (isec->owner, isec)
& SEC_EXCLUDE) == 0
&& ((elf_section_data (isec)->this_hdr.sh_flags
@@ -458,9 +458,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
else
cr_type = CRT_SH5_ISA16;
- cr_size
- = (isec->_cooked_size
- ? isec->_cooked_size : isec->_raw_size);
+ cr_size = isec->size;
/* Sections can be empty, like .text in a file that
only contains other sections. Ranges shouldn't be
@@ -563,8 +561,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void)
Sorting before writing is done by sh64_elf_final_write_processing. */
- cranges->_cooked_size = crangesp - cranges->contents;
sh64_elf_section_data (cranges)->sh64_info->cranges_growth
- = cranges->_cooked_size - cranges->_raw_size;
- cranges->_raw_size = cranges->_cooked_size;
+ = crangesp - cranges->contents - cranges->size;
+ cranges->size = crangesp - cranges->contents;
}