lkml.org 
[lkml]   [2019]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v4 01/18] objtool: Add abstraction for computation of symbols offsets
On Fri, Aug 16, 2019 at 01:23:46PM +0100, Raphael Gault wrote:
> @@ -672,14 +672,19 @@ static int add_call_destinations(struct objtool_file *file)
> }
>
> } else if (rela->sym->type == STT_SECTION) {
> + /*
> + * the original x86_64 code adds 4 to the rela->addend
> + * which is not needed on arm64 architecture.
> + */
> + dest_off = arch_dest_rela_offset(rela->addend);

I agree with Julien that this comment isn't needed. The "arch_" prefix
already implies there are arch-specific differences.

Also, this patch should replace all the other "addend + 4" usages:

$ git grep "addend + 4" tools/objtool
tools/objtool/arch/x86/decode.c: return addend + 4;
tools/objtool/check.c: dest_off = rela->addend + 4;
tools/objtool/check.c: dest_off = rela->sym->sym.st_value + rela->addend + 4;

--
Josh

\
 
 \ /
  Last update: 2019-08-22 21:57    [W:0.559 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site