Skip to content

MIPSr6: try to use bal call functions which need t9 to get GOT #64974

Open
@wzssyqa

Description

@wzssyqa

One example is
compiler-rt/lib/sanitizer_common/sanitizer_allocator_dlsym.h

  static void *Allocate(uptr size_in_bytes) {
    void *ptr = InternalAlloc(size_in_bytes, nullptr, kWordSize);
    CHECK(internal_allocator()->FromPrimary(ptr));
    Details::OnAllocate(ptr,
                        internal_allocator()->GetActuallyAllocatedSize(ptr));
    return ptr;
  }

Allocate call InternalAlloc by bal instead of jar $t9, while needs t9 to compute its GOT.

Let's use pcrel instructions to compute GOT instead of t9 for MIPSr6.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions