aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-07-23 11:15:06 +0000
committerNick Clifton <nickc@redhat.com>2002-07-23 11:15:06 +0000
commit5e8d7549530ad332442a2dde84d45242608a0446 (patch)
tree3ab6ffd37bd211da43536d4308408a6389767e37 /bfd/elf.c
parent88ff637d20a39762ef7fe3be2812c58713fecb74 (diff)
downloadgdb-5e8d7549530ad332442a2dde84d45242608a0446.zip
gdb-5e8d7549530ad332442a2dde84d45242608a0446.tar.gz
gdb-5e8d7549530ad332442a2dde84d45242608a0446.tar.bz2
Add new bitfield 'want_p_paddr_set_to_zero'.
Set this field for HPUX IA64 port. Test this field when setting p_paddr.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index ef2c3da..e84bd39 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2,21 +2,21 @@
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* SECTION
@@ -4813,9 +4813,10 @@ copy_private_bfd_data (ibfd, obfd)
/* The Solaris native linker always sets p_paddr to 0.
We try to catch that case here, and set it to the
- correct value. */
+ correct value. Note - some backends require that
+ p_paddr be left as zero. */
if (segment->p_paddr == 0
- && segment->p_vaddr != 0
+ && (! bed->want_p_paddr_set_to_zero)
&& isec == 0
&& output_section->lma != 0
&& (output_section->vma == (segment->p_vaddr
@@ -4832,7 +4833,10 @@ copy_private_bfd_data (ibfd, obfd)
LMA address of the output section. */
if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr)
|| IS_CONTAINED_BY_FILEPOS (section, segment, bed)
- || IS_COREFILE_NOTE (segment, section))
+ || IS_COREFILE_NOTE (segment, section)
+ || (bed->want_p_paddr_set_to_zero &&
+ IS_CONTAINED_BY_VMA (output_section, segment))
+ )
{
if (matching_lma == 0)
matching_lma = output_section->lma;