Page MenuHomeFreeBSD

Fix _mips_rtld_bind() to handle ELF filters.
ClosedPublic

Authored by jhb on Nov 23 2016, 6:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 8, 6:42 AM
Unknown Object (File)
Tue, Jul 1, 6:33 PM
Unknown Object (File)
Sun, Jun 29, 8:51 PM
Unknown Object (File)
Sun, Jun 22, 12:13 AM
Unknown Object (File)
Fri, Jun 20, 9:42 PM
Unknown Object (File)
Wed, Jun 18, 9:05 PM
Unknown Object (File)
Jun 9 2025, 6:59 PM
Unknown Object (File)
Jun 2 2025, 9:17 AM
Subscribers

Details

Summary

Fix _mips_rtld_bind() to handle ELF filters.

MIPS does not use the common _rtld_bind() to handle runtime binding.
Instead, it uses a private _mips_rtld_bind(). Update _mips_rtld_bind()
to include the changes made to _rtld_bind() in r216695 and r218476 to
support upgrading the read-locked rtld_bind_lock to a write lock when
an object with a filter is encountered.

While here, add a 'where' variable to track the location of the fixup
in the GOT to make the code flow more closely match _rtld_bind().

Test Plan
  • Ran kib's rtld-filter tests (but not the other tests from the tarball) under mipso32 (mipsn64 binaries failed to link)
  • Ran various other programs (linker was installed as the default linker in /) in both mipsn64 and mipso32 qemu instances.
  • Ran a gdb7 binary linked against libc++ (but not sure any filters were used as it was built purely with libc++ from scratch so shouldn't reference any libstdc++-specific ABI).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6052
Build 6318: arc lint + arc unit

Event Timeline

jhb retitled this revision from to Fix _mips_rtld_bind() to handle ELF filters..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: kib.
kib edited edge metadata.

Please add a comment to the _rtld_bind() function noting that _mips_rtld_bind() should be kept in sync.

This revision is now accepted and ready to land.Nov 23 2016, 6:57 PM
This revision was automatically updated to reflect the committed changes.