Skip to content

Commit 7ff2dc3

Browse files
authored
[profgen] Use a 64bit integer for &'ing the loadable address (#79930)
For the linux kernel, the loadable segments start at 0xffff... and thus the 32 bit integer here was truncating all the meaningful bits. Grow it to 64 bits.
1 parent 30155fc commit 7ff2dc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/tools/llvm-profgen/ProfiledBinary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ void ProfiledBinary::setPreferredTextSegmentAddresses(const ELFFile<ELFT> &Obj,
317317
// However such info isn't available at post-processing time, assuming
318318
// 4K page now. Note that we don't use EXEC_PAGESIZE from <linux/param.h>
319319
// because we may build the tools on non-linux.
320-
uint32_t PageSize = 0x1000;
320+
uint64_t PageSize = 0x1000;
321321
for (const typename ELFT::Phdr &Phdr : PhdrRange) {
322322
if (Phdr.p_type == ELF::PT_LOAD) {
323323
if (!FirstLoadableAddress)

0 commit comments

Comments
 (0)