return 2;
}
case R_386_PC32:
- error (0, 0, "%s: R_386_PC32 relocs should not be present in prelinked REL sections",
- dso->filename);
- return 1;
+ if (!dry_run)
+ error (0, 0, "%s: R_386_PC32 relocs should not be present in prelinked REL sections",
+ dso->filename);
+ return !dry_run;
+
case R_386_TLS_DTPOFF32:
write_le32 (dso, rel->r_offset, value);
break;
break;
case R_386_32:
case R_386_PC32:
- error (0, 0, "%s: R_386_%s32 relocs should not be present in prelinked REL sections",
- dso->filename, GELF_R_TYPE (rel->r_info) == R_386_32 ? "" : "PC");
- return 1;
+ if (!dry_run)
+ error (0, 0, "%s: R_386_%s32 relocs should not be present in prelinked REL sections",
+ dso->filename, GELF_R_TYPE (rel->r_info) == R_386_32 ? "" : "PC");
+ return !dry_run;
case R_386_TLS_DTPMOD32:
case R_386_TLS_DTPOFF32:
case R_386_TLS_TPOFF32:
goto error_out;
info->dsos[i] = dso;
/* Now check that the DSO matches what we recorded about it. */
- if (ent->timestamp != dso->info_DT_GNU_PRELINKED
+ if (!dry_run && (ent->timestamp != dso->info_DT_GNU_PRELINKED
|| ent->checksum != dso->info_DT_CHECKSUM
- || ent->base != dso->base)
+ || ent->base != dso->base))
{
error (0, 0, "%s: Library %s has changed since it has been prelinked",
info->dso->filename, ent->filename);
- info->dynbss_base, cr.rela[i].r_addend,
cr.rela[i].r_offset);
+ if (!dry_run) {
switch (j)
{
case 1:
goto error_out;
}
}
+ }
}
if (info->conflict_rela_size)
goto error_out;
}
- if (dry_run)
- close_dso (dso);
- else
- {
if (prelink_prepare (dso))
goto make_unprelinkable;
if (ent->type == ET_DYN && relocate_dso (dso, ent->base))
dso = NULL;
goto error_out;
}
- }
+
+ if (dry_run)
+ close_dso (dso);
+
ent->done = 2;
ent->flags |= PCF_PRELINKED;
int set;
int execflag;
+int dry_run = 0; // for arch-i386
const char *argp_program_version = "execstack 1.0";