X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Fust-elf.h;h=49edc6f9982667a89534e68c20acd261d7e72183;hb=05e8ff1f80c9a6dcd7db559c7a39b4c46e85e2a7;hp=fee52f9ef2ff0f5f432968f524e1e6dd0051d926;hpb=405be6583fc840d2ad298516edb267281bc2c4dc;p=lttng-ust.git diff --git a/include/lttng/ust-elf.h b/include/lttng/ust-elf.h index fee52f9e..49edc6f9 100644 --- a/include/lttng/ust-elf.h +++ b/include/lttng/ust-elf.h @@ -21,7 +21,6 @@ #include #include #include -#include #include #include @@ -77,6 +76,7 @@ bswap((phdr).p_filesz); \ bswap((phdr).p_memsz); \ bswap((phdr).p_align); \ + bswap((phdr).p_vaddr); \ } while (0) #define bswap_shdr(shdr) \ @@ -117,6 +117,7 @@ (dst_phdr).p_filesz = (src_phdr).p_filesz; \ (dst_phdr).p_memsz = (src_phdr).p_memsz; \ (dst_phdr).p_align = (src_phdr).p_align; \ + (dst_phdr).p_vaddr = (src_phdr).p_vaddr; \ } while (0) #define copy_shdr(src_shdr, dst_shdr) \ @@ -172,6 +173,7 @@ struct lttng_ust_elf_phdr { uint64_t p_filesz; uint64_t p_memsz; uint64_t p_align; + uint64_t p_vaddr; }; struct lttng_ust_elf_shdr { @@ -195,9 +197,9 @@ struct lttng_ust_elf_nhdr { struct lttng_ust_elf { /* Offset in bytes to start of section names string table. */ - uint64_t section_names_offset; + off_t section_names_offset; /* Size in bytes of section names string table. */ - uint64_t section_names_size; + size_t section_names_size; char *path; int fd; struct lttng_ust_elf_ehdr *ehdr; @@ -219,6 +221,7 @@ int is_elf_native_endian(struct lttng_ust_elf *elf) struct lttng_ust_elf *lttng_ust_elf_create(const char *path); void lttng_ust_elf_destroy(struct lttng_ust_elf *elf); +uint8_t lttng_ust_elf_is_pic(struct lttng_ust_elf *elf); int lttng_ust_elf_get_memsz(struct lttng_ust_elf *elf, uint64_t *memsz); int lttng_ust_elf_get_build_id(struct lttng_ust_elf *elf, uint8_t **build_id, size_t *length, int *found);