[all-commits] [llvm/llvm-project] fd624e: [llvm-objcopy] Don't specialize the all zero p_pad...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Apr 27 11:21:04 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: fd624e623d34dd0e812b7fdce73bdff15f456826
https://github.com/llvm/llvm-project/commit/fd624e623d34dd0e812b7fdce73bdff15f456826
Author: Fangrui Song <maskray at google.com>
Date: 2020-04-27 (Mon, 27 Apr 2020)
Changed paths:
M llvm/test/tools/llvm-objcopy/ELF/binary-no-paddr.test
M llvm/tools/llvm-objcopy/ELF/Object.cpp
Log Message:
-----------
[llvm-objcopy] Don't specialize the all zero p_paddr case
Spotted by https://reviews.llvm.org/D74755#1998673
> it looks like OrderedSegments in the function is only used to set the physical address to the virtual address when there are no physical addresses set amongst these sections.
I believe this behavior was copied from https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=6ffd79000b45e77b3625143932ffbf781b6aecab (2008-05)
The commit was made for some corner cases of very old linkers.
This special rule does not seem useful and remove it can allow us to
delete a large chunk of code.
Reviewed By: jhenderson, jakehehrlich
Differential Revision: https://reviews.llvm.org/D78786
More information about the All-commits
mailing list