[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/25354] On RISCV64 LD, with EXACTLY 72 headers/sections, PhysAddr
From: |
wilson at gcc dot gnu.org |
Subject: |
[Bug ld/25354] On RISCV64 LD, with EXACTLY 72 headers/sections, PhysAddr for first Program Header is wrong |
Date: |
Fri, 23 Oct 2020 01:18:07 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25354
--- Comment #2 from Jim Wilson <wilson at gcc dot gnu.org> ---
Sorry, that is the wrong commit id, it is the one immediately after
commit 64029e93683a266c38d19789e780f3748bd6a188
Author: Alan Modra <amodra@gmail.com>
Date: Fri Oct 5 11:40:54 2018 +0930
Separate header PT_LOAD for -z separate-code
This patch, along with previous patches in the series, supports
putting the ELF file header and program headers in a PT_LOAD without
sections.
Logic governing whether headers a loaded has changed a little: The
primary reason to include headers is now the presence of
SIZEOF_HEADERS in a linker script. However, to support scripts that
may have reserved space for headers by hand, we continue to add
headers whenever the first section address is past the end of headers
modulo page size.
include/
* bfdlink.h (struct bfd_link_info): Add load_phdrs field.
bfd/
* elf-nacl.c (nacl_modify_segment_map): Cope with header PT_LOAD
lacking sections.
* elf.c (_bfd_elf_map_sections_to_segments): Assume file and
program headers are required when info->load_phdrs. Reorganize
code handling program headers. Generate a mapping without
sections just for file and program headers when -z separate-code
would indicate they should be on a different page to the first
section.
--
You are receiving this mail because:
You are on the CC list for the bug.