lkml.org 
[lkml]   [2023]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/3] modpost: factor out inst location calculation to section_rel()
On Thu, Jun 22, 2023 at 10:38 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Fri, Jun 23, 2023 at 3:25 AM Nick Desaulniers
> <ndesaulniers@google.com> wrote:
> >
> > On Tue, Jun 20, 2023 at 5:05 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> > > index 6e0b8be32648..2551ac9d5bd3 100644
> > > --- a/scripts/mod/modpost.c
> > > +++ b/scripts/mod/modpost.c
> > > @@ -1519,17 +1512,20 @@ static void section_rel(struct module *mod, struct elf_info *elf,
> > > r_sym = ELF_R_SYM(r.r_info);
> > > #endif
> > > r.r_addend = 0;
> > > +
> > > + loc = sym_get_data_by_offset(elf, fsecndx, r.r_offset);
> >
> > Can we compute `loc` only for the three machine types?
>
>
>
> I believe you can compute the location in the same way for any architecture
> because it is mentioned in ELF spec.

Sure, but perhaps it's wasted work for other machine types?
--
Thanks,
~Nick Desaulniers

\
 
 \ /
  Last update: 2023-06-23 19:03    [W:0.041 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site