Page MenuHomeFreeBSD

RFC populate DT_DEBUG on MIPS if PT_DYNAMIC is writable
ClosedPublic

Authored by emaste on Jan 5 2016, 1:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 13, 6:55 AM
Unknown Object (File)
Thu, Feb 13, 4:24 AM
Unknown Object (File)
Wed, Feb 12, 12:02 AM
Unknown Object (File)
Wed, Feb 5, 5:37 AM
Unknown Object (File)
Thu, Jan 30, 12:39 AM
Unknown Object (File)
Dec 30 2024, 4:58 AM
Unknown Object (File)
Dec 28 2024, 3:36 PM
Unknown Object (File)
Dec 14 2024, 8:55 PM
Subscribers

Details

Summary

See http://reviews.llvm.org/D15775 where there's a suggestion that lld include DT_DEBUG also on MIPS. Then this change will allow rtld to populate DT_DEBUG, and lldb can then use DT_DEBUG if set, and eventually we can remove one MIPS special-case. Review posted for discussion; there may be a better implementation.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste retitled this revision from to RFC populate DT_DEBUG on MIPS if PT_DYNAMIC is writable.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added a reviewer: kib.
emaste added subscribers: adrian, davide.

Why do you need #ifdef mips around the writable_dynamic handling ?

In D4791#101766, @kib wrote:

Why do you need #ifdef mips around the writable_dynamic handling ?

I don't need it, I suppose, but PT_DYNAMIC is specified to be writable on all other platforms and I didn't want to introduce an unnecessary test.

I don't need it, I suppose, but PT_DYNAMIC is specified to be writable on all other platforms and I didn't want to introduce an unnecessary test.

The test is so cheap that I do not see much reason to #ifdef it.

emaste edited edge metadata.

Drop #ifdef __mips__ from writable_dynamic test. As @kib points out the test is cheap enough.

kib edited edge metadata.
kib added inline comments.
libexec/rtld-elf/rtld.c
1335 ↗(On Diff #11949)

s/1/true/

This revision is now accepted and ready to land.Jan 5 2016, 2:26 PM
This revision was automatically updated to reflect the committed changes.