aboutsummaryrefslogtreecommitdiff
path: root/gold/dynobj.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-10-06 12:24:28 +0930
committerAlan Modra <amodra@gmail.com>2018-10-08 20:26:08 +1030
commit5d695627883b32cf33adb529c8fc7271b46dcf55 (patch)
tree4baf2317406f3ca458656472fcd8812edde379be /gold/dynobj.h
parent1b9e270b09c140464a7892c95c28eafa812c6b08 (diff)
downloadgdb-5d695627883b32cf33adb529c8fc7271b46dcf55.zip
gdb-5d695627883b32cf33adb529c8fc7271b46dcf55.tar.gz
gdb-5d695627883b32cf33adb529c8fc7271b46dcf55.tar.bz2
Use p_vaddr_offset to set p_vaddr on segments without sections
p_vaddr is currently set from the first section vma if a segment has sections, and to zero if a segment has no sections. This means we lose p_vaddr when objcopy'ing executables if a segment without sections has a non-zero p_vaddr. This patch saves p_vaddr to p_vaddr_offset, and to make the use of p_vaddr_offset consistent, inverts the sign. (It's now added to section vma to get segment vaddr, and added to zero when there are no sections.) * elf.c (assign_file_positions_for_load_sections): Set p_vaddr from m->p_vaddr_offset for segments without sections. Invert sign of p_vaddr_offset. (rewrite_elf_program_header, copy_elf_program_header): Save old segment p_vaddr to p_vaddr_offset. Invert sign of p_vaddr_offset.
Diffstat (limited to 'gold/dynobj.h')
0 files changed, 0 insertions, 0 deletions