Skip to content
Snippets Groups Projects
Commit cce0d2bf authored by Simon McVittie's avatar Simon McVittie
Browse files

process_pt_dynamic: Stop calling find_value()


Now that we do this in two passes, if we haven't found a valid
DT_PLTRELSZ, DT_PLTREL or DT_RELASZ yet, we never will.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent c73d5158
Branches
Tags
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
......@@ -672,7 +672,10 @@ process_pt_dynamic (void *start,
{
DEBUG( DEBUG_ELF, "processing DT_RELA section" );
if( relasz == -1 )
relasz = find_value( base, start, DT_RELASZ );
{
fprintf( stderr, "libcapsule: DT_RELA section not accompanied by DT_RELASZ, ignoring" );
break;
}
relstart = (void *) fix_addr( (const void *) base, entry->d_un.d_ptr );
process_rela( relstart, relasz, strtab, symtab, base, data );
}
......@@ -685,9 +688,16 @@ process_pt_dynamic (void *start,
case DT_JMPREL:
if( jmprelsz == -1 )
jmprelsz = find_value( base, start, DT_PLTRELSZ );
{
fprintf( stderr, "libcapsule: DT_JMPREL section not accompanied by DT_PLTRELSZ, ignoring" );
break;
}
if( jmpreltype == DT_NULL )
jmpreltype = find_value( base, start, DT_PLTREL );
{
fprintf( stderr, "libcapsule: DT_JMPREL section not accompanied by DT_PLTREL, ignoring" );
break;
}
switch( jmpreltype )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment