diff options
author | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2019-10-21 14:40:40 +0100 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2019-10-30 09:15:04 +0000 |
commit | fca416d1545f2833f4412f1750192b91df1f3ef1 (patch) | |
tree | 8a7c29b50656b3a16d05d0491fd1225e0da3e761 /src/base/loader/elf_object.hh | |
parent | eef524d9ecf692875c899f112c4ddfdec03d7088 (diff) | |
download | gem5-fca416d1545f2833f4412f1750192b91df1f3ef1.tar.xz |
base: Name segments after their index
Current loader is performing a linear scan of the section table for
every segment in the elf since it is naming every segment after the
sections it contains. With this patch we are just naming segments
after their index.
This is in any case how they are referenced when a readelf --segments
command is issued on the elf file.
Change-Id: I599400fcdfc0b80ac64632aba36781bd876777f0
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21999
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/base/loader/elf_object.hh')
-rw-r--r-- | src/base/loader/elf_object.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base/loader/elf_object.hh b/src/base/loader/elf_object.hh index 42edc7438..2cc2016fd 100644 --- a/src/base/loader/elf_object.hh +++ b/src/base/loader/elf_object.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 ARM Limited + * Copyright (c) 2013, 2019 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -63,7 +63,7 @@ class ElfObject : public ObjectFile void determineArch(); void determineOpSys(); - void handleLoadableSegment(GElf_Phdr phdr); + void handleLoadableSegment(GElf_Phdr phdr, int seg_num); // These values are provided to a linux process by the kernel, so we // need to keep them around. |