diff --git a/compiler/elf_builder.h b/compiler/elf_builder.h
index 943e2a8..42f4e41 100644
--- a/compiler/elf_builder.h
+++ b/compiler/elf_builder.h
@@ -164,12 +164,6 @@
       }
     }
 
-    // Returns true if the section was written to disk.
-    // (Used to check whether we have .text when writing JIT debug info)
-    bool Exists() const {
-      return finished_;
-    }
-
     // Get the location of this section in virtual memory.
     Elf_Addr GetAddress() const {
       CHECK(started_);
@@ -363,16 +357,18 @@
     void Add(Elf_Word name,
              const Section* section,
              Elf_Addr addr,
-             bool is_relative,
              Elf_Word size,
              uint8_t binding,
-             uint8_t type,
-             uint8_t other = 0) {
-      DCHECK(section != nullptr || !is_relative);
-      Elf_Addr abs_addr = addr + (is_relative ? section->GetAddress() : 0);
-      Elf_Word section_index =
-          (section != nullptr) ? section->GetSectionIndex() : static_cast<Elf_Word>(SHN_ABS);
-      Add(name, section_index, abs_addr, size, binding, type, other);
+             uint8_t type) {
+      Elf_Word section_index;
+      if (section != nullptr) {
+        DCHECK_LE(section->GetAddress(), addr);
+        DCHECK_LE(addr, section->GetAddress() + section->GetSize());
+        section_index = section->GetSectionIndex();
+      } else {
+        section_index = static_cast<Elf_Word>(SHN_ABS);
+      }
+      Add(name, section_index, addr, size, binding, type);
     }
 
     void Add(Elf_Word name,
@@ -380,13 +376,12 @@
              Elf_Addr addr,
              Elf_Word size,
              uint8_t binding,
-             uint8_t type,
-             uint8_t other = 0) {
+             uint8_t type) {
       Elf_Sym sym = Elf_Sym();
       sym.st_name = name;
       sym.st_value = addr;
       sym.st_size = size;
-      sym.st_other = other;
+      sym.st_other = 0;
       sym.st_shndx = section_index;
       sym.st_info = (binding << 4) + (type & 0xf);
       CachedSection::Add(&sym, sizeof(sym));
