Skip to content

If the load address is not set to 0 in libc elf, the offset of symbols cannot retrieve correctly  #2648

Closed
@jason-chenyixi-chengdu

Description

Hi,
When I tried to deploy bcc in an embedded system, i found that invalid argument error orrcured. After troubleshooting, I found that is the offset of 'malloc'(i tried to execute memleak) in libc.so is bigger than the size of libc. That is because the load address is not set to 0 in my libc, so the value of malloc in symbol table is not offset. What i have done to fix it is retrieve the base load address from programe header first, then substracted the value by the base address.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions