aboutsummaryrefslogtreecommitdiff
path: root/ld/po
diff options
context:
space:
mode:
authorJozef Lawrynowicz <jozef.l@mittosystems.com>2018-09-03 11:04:05 +0930
committerAlan Modra <amodra@gmail.com>2018-09-03 15:50:54 +0930
commit2542e49e21e6b7270f72c7be0fc4ff1a986371da (patch)
tree777d1a3646fb84149fcbf78912e675a0443851d6 /ld/po
parent0d9a433be406220413671495a9b0fab577a48b5e (diff)
downloadgdb-2542e49e21e6b7270f72c7be0fc4ff1a986371da.zip
gdb-2542e49e21e6b7270f72c7be0fc4ff1a986371da.tar.gz
gdb-2542e49e21e6b7270f72c7be0fc4ff1a986371da.tar.bz2
PR23595, simple objcopy of executable failure for msp430-elf
VMA of the first section in the segment containing the ELF file header (and possibly section headers too) can't be used to reliably find the size of the headers plus padding. What's really needed is sh_offset of the first section assuming it has contents (vma does have a relationship to sh_offset, but is only guaranteed in demand paged executables). If the first section is SHT_NOBITS and it hasn't been converted to have file contents by the existence of a following SHT_PROGBITS section in the same segment, the sh_offset value also isn't reliable. PR 23595 elf.c (copy_elf_program_header): When first segment contains only the headers and SHT_NOBITS sections, use segment p_filesz to calculate header and padding size. Use filepos of the first section otherwise.
Diffstat (limited to 'ld/po')
0 files changed, 0 insertions, 0 deletions