aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2010-06-11 15:30:38 +0000
committerTristan Gingold <gingold@adacore.com>2010-06-11 15:30:38 +0000
commitf654f403d36137b18c3739e1feb4bb363f67a81c (patch)
treebe843792c6edc0bb18349ad2962f715214e45f00 /bfd
parentff150b92be4517e9df706ec2609c3a6cf25536a0 (diff)
downloadgdb-f654f403d36137b18c3739e1feb4bb363f67a81c.zip
gdb-f654f403d36137b18c3739e1feb4bb363f67a81c.tar.gz
gdb-f654f403d36137b18c3739e1feb4bb363f67a81c.tar.bz2
2010-06-11 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute sections to 0.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/vms-alpha.c18
2 files changed, 17 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0722006..85aa8eb 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2010-06-11 Tristan Gingold <gingold@adacore.com>
+ * vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute
+ sections to 0.
+
+2010-06-11 Tristan Gingold <gingold@adacore.com>
+
* vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW.
2010-06-11 Tristan Gingold <gingold@adacore.com>
diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c
index 6591f3f..ff3062a 100644
--- a/bfd/vms-alpha.c
+++ b/bfd/vms-alpha.c
@@ -1154,12 +1154,18 @@ _bfd_vms_slurp_egsd (bfd *abfd)
if (!bfd_set_section_flags (abfd, section, new_flags))
return FALSE;
section->alignment_power = egps->align;
- align_addr = (1 << section->alignment_power);
- if ((base_addr % align_addr) != 0)
- base_addr += (align_addr - (base_addr % align_addr));
- section->vma = (bfd_vma)base_addr;
- base_addr += section->size;
- section->filepos = (unsigned int)-1;
+ if ((old_flags & EGPS__V_REL) != 0)
+ {
+ /* Give a non-overlapping vma to non absolute sections. */
+ align_addr = (1 << section->alignment_power);
+ if ((base_addr % align_addr) != 0)
+ base_addr += (align_addr - (base_addr % align_addr));
+ section->vma = (bfd_vma)base_addr;
+ base_addr += section->size;
+ }
+ else
+ section->vma = 0;
+ section->filepos = 0;
/* Append it to the section array. */
if (PRIV (section_count) >= PRIV (section_max))