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
F161597277: D4791.id11949.diff
Sun, Jul 5, 5:33 AM
Unknown Object (File)
Fri, Jul 3, 5:37 AM
Unknown Object (File)
Fri, Jul 3, 5:24 AM
Unknown Object (File)
Fri, Jul 3, 3:39 AM
Unknown Object (File)
Fri, Jul 3, 3:32 AM
Unknown Object (File)
Thu, Jul 2, 8:21 PM
Unknown Object (File)
Apr 28 2026, 8:30 PM
Unknown Object (File)
Apr 28 2026, 8:26 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

Lint
Lint Skipped
Unit
Tests Skipped

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

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.