aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-02-13 10:20:59 +0000
committerNick Clifton <nickc@redhat.com>2002-02-13 10:20:59 +0000
commitbf36db1824820273d5766b88bdcd75bd51e05f08 (patch)
tree9533e28a71203cdc56a711b2fa85833b0947ef7b /bfd
parent6cdd886ce9775afcb1f968f3a6d4a934b5d5e5b7 (diff)
downloadfsf-binutils-gdb-bf36db1824820273d5766b88bdcd75bd51e05f08.zip
fsf-binutils-gdb-bf36db1824820273d5766b88bdcd75bd51e05f08.tar.gz
fsf-binutils-gdb-bf36db1824820273d5766b88bdcd75bd51e05f08.tar.bz2
Accept a physicall address of 0 as valid in a program header
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5bdb985..c4ee9c5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
+ non-zero physical addresses when adjusting the LMAs of new
+ sections.
+
2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
* elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
diff --git a/bfd/elf.c b/bfd/elf.c
index da46258..519e71d 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -652,10 +652,15 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name)
offset plus size lies within the segment's memory
span and, if the section is loaded, the extent of the
loaded data lies within the extent of the segment.
- If the p_paddr field is not set, we don't alter the
- LMA. */
+
+ Note - we used to check the p_paddr field as well, and
+ refuse to set the LMA if it was 0. This is wrong
+ though as a perfectly valid, initialised segment can
+ have a p_paddr of zero. Some architectures, eg ARM,
+ place special significance one the address 0 and
+ executables need to be able to have a segment which
+ covers this address. */
if (phdr->p_type == PT_LOAD
- && phdr->p_paddr
&& (bfd_vma) hdr->sh_offset >= phdr->p_offset
&& (hdr->sh_offset + hdr->sh_size
<= phdr->p_offset + phdr->p_memsz)