#018

2: Dissecando ELF

eZine's profile picture
Published in 
 · 24 Sep 2023
... r)*) mem; /* Checa a assinatura do ELF */ if (memcmp(header->e_ident, ELFMAG, SELFMAG) != 0) { printf("Não possui a assinatura de um ELF!\n"); exit(1); } pheaders = (ElfW(Phdr)*) (mem + header->e_phoff); #ifdef __x86_64__ #define FMT "%#018lx" #else #define FMT "%#08x" #endif for (i = 0; i < header->e_phnum; ++i) { printf("Offset: " FMT "\n", ((ElfW(Phdr)*)(pheaders + i))->p_offset); } munmap(mem, st.st_size); close(fd); return 0; } ---------------------------------8<------ ...

C++ Newsletter/Tutorial Issue 20

eZine's profile picture
Published in 
 · 7 Mar 2022
... or new, which can be). The library also defines a similar placement new/delete for allocating arrays at a specific address. NOTES FROM ANSI/ISO - CURRENT DRAFT STANDARD NOW PUBLICLY AVAILABLE Jonathan Schilling, jls@sco.com In C++ Newsletter #018 it was mentioned that the C++ standards committee has recently issued its "second Committee Draft" (CD2) of the standard, with an associated public review period, but that due to ISO policy the draft would not be available without charge. ISO has ju ...
loading
Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT