Blame bloaty-1.1-longlong.patch

f945916
diff -up ./src/elf.cc.2 ./src/elf.cc
f945916
--- ./src/elf.cc.2	2020-08-02 17:34:06.872636546 -0400
f945916
+++ ./src/elf.cc	2020-08-02 17:34:26.293491457 -0400
f945916
@@ -794,12 +794,12 @@ void ForEachElf(const InputFile& file, R
f945916
 //
f945916
 // - 24 bits for index (up to 16M symbols with -ffunction-sections)
f945916
 // - 40 bits for address (up to 1TB section)
f945916
-static uint64_t ToVMAddr(size_t addr, long ndx, bool is_object) {
f945916
+static uint64_t ToVMAddr(uint64_t addr, int64_t ndx, bool is_object) {
f945916
   if (is_object) {
f945916
     if (ndx >= 1 << 24) {
f945916
       THROW("ndx overflow: too many sections");
f945916
     }
f945916
-    if (addr >= 1UL << 40) {
f945916
+    if (addr >= 1ULL << 40) {
f945916
       THROW("address overflow: section too big");
f945916
     }
f945916
     return (ndx << 40) | addr;