The aim is to get the address of the precomputed tables in the openssl implementation of AES. These tables are contained in the aes_core.c file and named Te0, Te1, etc. I am trying to do it using the info address SYMBOL_NAME
command in gdb
.
So these are the steps I followed so far:
- Disable ASLR (
sudo sysctl kernel.randomize_va_space=0
) - Compile openssl (version 101e) with
configure -d shared
to keep debugging symbols - Link a program to the above mentioned version of openssl (I made sure of that using
info sharedlibrary
in gdb) - Run the program in gdb and use
info address Te0
(or any other table)
Result: No symbol "Te0" in current context.
The same doesn't happen for, e.g., the function private_AES_set_encrypt_key
(also in aes_core.c). In fact the result, in this case, is: Symbol "private_AES_set_encrypt_key" is at 0x7ffff7a483f0 in a file compiled without debugging.
which is exactly what I need.
My idea: these tables are declared as static const
so I guess they might be optimized somehow but then again I am intentionally compiling openssl with support for debugging. So why can't I see those symbols in gdb?
Thank you in advance for your help!