Debugging a statically linked program fails:
$ gcc -gdwarf -no-pie -static -o tests/hello tests/hello.c
$ ups/ups tests/hello
Can't find shared library information in ELF executable ./blah (no `.dynamic' section)
Hello world
Fatal internal error: ao_read_text_from_process with no proc (aborting) ...
Dumping core ... Aborted (core dumped)
ptrace_init_pid is called with a valid pid at some point, but in ao_read_text_from_process
ip->ip_pid is zero. There are several placed where ip_pid might get reset to zero.
There seems to be a historical issue with statically linked programs:
|
if (!get_elf_shlib_info(ap, el, &soname, &rpath, &runpath, &debug_vaddr, |
|
&dyn_symtab_vaddr, &dyn_strtab_vaddr, |
|
&plt_rel_vaddr, &plt_rel_type)) |
|
{ |
|
/* RGA completely statically linked targets used to return |
|
FALSE at this point, terminiating the debug seesion. |
|
Changed to continue with null data. |
|
*/ |
|
} |
Debugging a statically linked program fails:
ptrace_init_pidis called with a validpidat some point, but inao_read_text_from_processip->ip_pidis zero. There are several placed whereip_pidmight get reset to zero.There seems to be a historical issue with statically linked programs:
ups/ups/ao_elflib.c
Lines 1274 to 1282 in c1fb509