Skip to content

Commit

Permalink
rtld: Ignore '-z now' related bind flags in program interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed Oct 17, 2024
1 parent fb9b3db commit adb0c87
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions options/rtld/generic/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,18 @@ extern "C" void *interpreterMain(uintptr_t *entry_stack) {
case DT_RELRENT:
case DT_PLTGOT:
continue;
case DT_FLAGS: {
if(ent->d_un.d_val & DF_BIND_NOW) {
continue;
}
mlibc::panicLogger() << "rtld: unexpected DT_FLAGS value of " << frg::hex_fmt(ent->d_un.d_val) << " in program interpreter" << frg::endlog;
}
case DT_FLAGS_1: {
if(ent->d_un.d_val & DF_1_NOW) {
continue;
}
mlibc::panicLogger() << "rtld: unexpected DT_FLAGS_1 value of " << frg::hex_fmt(ent->d_un.d_val) << " in program interpreter" << frg::endlog;
}
default:
mlibc::panicLogger() << "rtld: unexpected dynamic entry " << ent->d_tag << " in program interpreter" << frg::endlog;
}
Expand Down

0 comments on commit adb0c87

Please sign in to comment.