base: Name segments after their index
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 21 Oct 2019 13:40:40 +0000 (14:40 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 30 Oct 2019 09:15:04 +0000 (09:15 +0000)
commitfca416d1545f2833f4412f1750192b91df1f3ef1
tree8a7c29b50656b3a16d05d0491fd1225e0da3e761
parenteef524d9ecf692875c899f112c4ddfdec03d7088
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>
src/base/loader/elf_object.cc
src/base/loader/elf_object.hh