clover/llvm: Clean up ELF parsing.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 17 May 2016 14:02:48 +0000 (16:02 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 12 Jul 2016 03:22:48 +0000 (20:22 -0700)
commit7bcefa59031992a39ac997c2000dbad26153aed2
tree78003e1e04e20a752b7046fe5c84f71affa24711
parent574477e5994166ce6212e922ff15d6a36f840bf3
clover/llvm: Clean up ELF parsing.

This function was doing three separate things:
 - Initializing and releasing the ELF parsing state (the latter can be
   better done using RAII).
 - Searching for the symbol table in the ELF file.
 - Extraction of kernel symbol offsets from the symbol table.

Split each one into a separate function for clarity and clean up the
result slightly.

Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/state_trackers/clover/llvm/invocation.cpp