You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So here DR identifies 7ff77fc000 as the base, which is where the vDSO is, and so it finds an ELF header, but the wrong one... It's worth noting that 7ff77fd000, where libynamorio.so is supposed to start, contains the same data as in address 0x1000 in the hexdump of libdynamorio.so, implying libdynamorio.so should start at the address 0x1000 before 7ff77fd000, which is where vDSO is.
The patch #7186changes this base address to 0x1000, which allows libdynamorio.so to find the correct ELF header, and has the following effect in memory:
So now vDSO and libdynamorio.so don't overlap, but libdynamorio.so finds the ELF header at 7ff77fc000, which is vDSO's
It seems that base/Ttext becomes an offset from 0x7ff77fd000 (or the random address chosen when not running under LLDB). Although setting base/Ttext to 0x1000 seems to work, it would be best to solve the issue of libdynamorio.so finding the vDSO's ELF header when the correct ELF header is present in memory, e.g. in the last example given here where the vDSO is between libdynamorio.so's .text portion and its ELF header, leading vDSO's ELF header to be found first and chosen.
The text was updated successfully, but these errors were encountered:
See #7186
On 64-bit Android, when DR tries to find its own ELF header to use for private loading, it instead finds the ELF header of the vDSO.
When 64-bit Android's base address is set to 0x0, as for 32-bit Android:
So here DR identifies 7ff77fc000 as the base, which is where the vDSO is, and so it finds an ELF header, but the wrong one... It's worth noting that 7ff77fd000, where libynamorio.so is supposed to start, contains the same data as in address 0x1000 in the hexdump of libdynamorio.so, implying libdynamorio.so should start at the address 0x1000 before 7ff77fd000, which is where vDSO is.
The patch #7186 changes this base address to
0x1000
, which allowslibdynamorio.so
to find the correct ELF header, and has the following effect in memory:ELF headers for both libdynamorio.so and vDSO are at the start of their sections as expected:
Keeping the non-32-bit Android base of
0x71000000
:So now vDSO and libdynamorio.so don't overlap, but libdynamorio.so finds the ELF header at 7ff77fc000, which is vDSO's
It seems that
base
/Ttext
becomes an offset from0x7ff77fd000
(or the random address chosen when not running under LLDB). Although settingbase
/Ttext
to0x1000
seems to work, it would be best to solve the issue oflibdynamorio.so
finding thevDSO
's ELF header when the correct ELF header is present in memory, e.g. in the last example given here where thevDSO
is betweenlibdynamorio.so
's.text
portion and its ELF header, leadingvDSO
's ELF header to be found first and chosen.The text was updated successfully, but these errors were encountered: