[Mesa-stable] [PATCH 1/3] amd: Add relocation type and relocation target type to reloc structure
Jan Vesely
jan.vesely at rutgers.edu
Tue Jun 4 05:29:26 UTC 2019
On Tue, 2019-06-04 at 00:20 -0400, Marek Olšák wrote:
> This series will probably conflict with the new linker, which will
> also
> handle relocations and more:
> https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.freedesktop.org%2Fseries%2F60255%2F&data=02%7C01%7Cjan.vesely%40cs.rutgers.edu%7C48f1da4abf674754c36208d6e8a421ea%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636952188985357253&sdata=O6Z%2Ftp6JUpjDgCU%2BvPN0Tp4nlBbhyR6XWzb7uaCNYls%3D&reserved=0
It sure does. That series does not consider sections as relocation
targets, but it's just few lines to patch that in. is there an ETA for
the linker series?
Jan
>
> Marek
>
> On Mon, Jun 3, 2019 at 10:39 PM Jan Vesely <jan.vesely at rutgers.edu> wrote:
>
> > Cc: mesa-stable at lists.freedesktop.org
> > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> > ---
> > src/amd/common/ac_binary.c | 2 ++
> > src/amd/common/ac_binary.h | 2 ++
> > 2 files changed, 4 insertions(+)
> >
> > diff --git a/src/amd/common/ac_binary.c b/src/amd/common/ac_binary.c
> > index 8f4755ebe16..18dc72c61f0 100644
> > --- a/src/amd/common/ac_binary.c
> > +++ b/src/amd/common/ac_binary.c
> > @@ -102,6 +102,8 @@ static void parse_relocs(Elf *elf, Elf_Data *relocs,
> > Elf_Data *symbols,
> > reloc->offset = rel.r_offset;
> > strncpy(reloc->name, symbol_name, sizeof(reloc->name)-1);
> > reloc->name[sizeof(reloc->name)-1] = 0;
> > + reloc->type = GELF_R_TYPE(rel.r_info);
> > + reloc->target_type = GELF_ST_TYPE(symbol.st_info);
> > }
> > }
> >
> > diff --git a/src/amd/common/ac_binary.h b/src/amd/common/ac_binary.h
> > index 735e3932055..7541f19fb8e 100644
> > --- a/src/amd/common/ac_binary.h
> > +++ b/src/amd/common/ac_binary.h
> > @@ -34,6 +34,8 @@ extern "C" {
> > struct ac_shader_reloc {
> > char name[32];
> > uint64_t offset;
> > + int type;
> > + int target_type;
> > };
> >
> > struct ac_shader_binary {
> > --
> > 2.21.0
> >
> > _______________________________________________
> > mesa-stable mailing list
> > mesa-stable at lists.freedesktop.org
> > https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-stable&data=02%7C01%7Cjan.vesely%40cs.rutgers.edu%7C48f1da4abf674754c36208d6e8a421ea%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636952188985357253&sdata=nzz6HTQyMlkHHqFDKOgGb8r9k55YjXtwbO7VQUBCyaU%3D&reserved=0
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20190604/1f498031/attachment-0001.sig>
More information about the mesa-stable
mailing list