objtool: Add support for relocations without addends

Currently objtool only collects information about relocations with
addends. In recordmcount, which we are about to merge into objtool,
some supported architectures do not use rela relocations.

Signed-off-by: Matt Helsley <mhelsley@vmware.com>
Reviewed-by: Julien Thierry <jthierry@redhat.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
This commit is contained in:
Matt Helsley
2020-05-29 14:01:14 -07:00
committed by Josh Poimboeuf
parent f197422263
commit fb414783b6
3 changed files with 134 additions and 20 deletions

View File

@@ -181,7 +181,7 @@ int create_orc_sections(struct objtool_file *file)
if (!sec)
return -1;
ip_relocsec = elf_create_reloc_section(file->elf, sec);
ip_relocsec = elf_create_reloc_section(file->elf, sec, SHT_RELA);
if (!ip_relocsec)
return -1;