Dear Mark, Mark Wielaard wrote on 06.08.2015 00:29: > On Wed, 2015-08-05 at 17:55 +0200, Kai Wasserbäch wrote: >> So, if I've understood you correctly, you want an ELF dump of a Mesa build >> linked against libelfg0 and one linked against libelf1. You can find the >> generated files in the attached Tar archive. Please note, that the run with >> libelf1 only produced two dumps before segfaulting. > > That seems to confirm that the generation is the same (at least for the > first two files). I was hoping to find a difference between parsing some > of these files with an old/new libelf. So I wrote a little program that > is just the parsing as radeon_elf_read () does. But found no difference. > Maybe I am not testing against the right versions though (they are my > local builds). > > Could you compile the following with: > gcc -g -lelf -o elfrel elfrel.c
this does not work for several reasons: 1. I certainly need -std=c99 for the inline initialisation of the counter in the for() statement. 2. *section (first used in »gelf_getshdr(section, §ion_header)«) isn't defined/filled anywhere: # $ gcc -g -lelf -std=c99 -o elfrel elfrel.c # elfrel.c: In function ‘main’: # elfrel.c:26:24: error: ‘section’ undeclared (first use in this function) # if (gelf_getshdr(section, §ion_header) != §ion_header) # ^ # elfrel.c:26:24: note: each undeclared identifier is reported only once for each function it appears in While defining »Elf_Scn *section;« gives me a compiling elfrel.c, it unsurprisingly doesn't do anything afterwards, since section is empty. Long story short: did you paste the entire/correct code? Maybe just attach the file and send an MD5 or something along. Cheers, Kai
signature.asc
Description: OpenPGP digital signature