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)
Sat, Apr 20, 2:34 PM
Unknown Object (File)
Sat, Apr 20, 2:04 PM
Unknown Object (File)
Jan 9 2024, 8:41 AM
Unknown Object (File)
Dec 27 2023, 7:43 PM
Unknown Object (File)
Dec 27 2023, 7:35 PM
Unknown Object (File)
Oct 28 2023, 9:22 AM
Unknown Object (File)
Oct 15 2023, 3:40 AM
Unknown Object (File)
Aug 6 2023, 8:59 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 Not Applicable
Unit
Tests Not Applicable

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.