rewrite_elf_program_header and want_p_paddr_set_to_zero
authorAlan Modra <amodra@gmail.com>
Sat, 18 Mar 2023 04:58:19 +0000 (15:28 +1030)
committerAlan Modra <amodra@gmail.com>
Sun, 19 Mar 2023 11:49:19 +0000 (22:19 +1030)
commit5f51eb9397768a6d93e523e05f5b7e8f78465c71
treef46bb3a4d29c2ee44400c42ef27db94bef2aee5f
parent75831f18a0326573a2116e1f57fa5c8e09bd7738
rewrite_elf_program_header and want_p_paddr_set_to_zero

Layout in rewrite_elf_program_header is really done by lma, even if
program headers are going to have their p_paddr forced to zero.  Thus
when not matching against an existing segment, don't try to use a
"vma" from elf_segment_map.

* elf.c (is_contained_by): Replace "bed" param with "use_vaddr".
(IS_SECTION_IN_INPUT_SEGMENT): Adjust is_contained_by call.
(rewrite_elf_program_header): Always match against lma in
calls to is_contained_by using new maps.
bfd/elf.c