|
@@ -742,6 +742,7 @@ static int load_flat_file(struct linux_binprm * bprm,
|
|
* __start to address 4 so that is okay).
|
|
* __start to address 4 so that is okay).
|
|
*/
|
|
*/
|
|
if (rev > OLD_FLAT_VERSION) {
|
|
if (rev > OLD_FLAT_VERSION) {
|
|
|
|
+ unsigned long persistent = 0;
|
|
for (i=0; i < relocs; i++) {
|
|
for (i=0; i < relocs; i++) {
|
|
unsigned long addr, relval;
|
|
unsigned long addr, relval;
|
|
|
|
|
|
@@ -749,6 +750,8 @@ static int load_flat_file(struct linux_binprm * bprm,
|
|
relocated (of course, the address has to be
|
|
relocated (of course, the address has to be
|
|
relocated first). */
|
|
relocated first). */
|
|
relval = ntohl(reloc[i]);
|
|
relval = ntohl(reloc[i]);
|
|
|
|
+ if (flat_set_persistent (relval, &persistent))
|
|
|
|
+ continue;
|
|
addr = flat_get_relocate_addr(relval);
|
|
addr = flat_get_relocate_addr(relval);
|
|
rp = (unsigned long *) calc_reloc(addr, libinfo, id, 1);
|
|
rp = (unsigned long *) calc_reloc(addr, libinfo, id, 1);
|
|
if (rp == (unsigned long *)RELOC_FAILED) {
|
|
if (rp == (unsigned long *)RELOC_FAILED) {
|
|
@@ -757,7 +760,7 @@ static int load_flat_file(struct linux_binprm * bprm,
|
|
}
|
|
}
|
|
|
|
|
|
/* Get the pointer's value. */
|
|
/* Get the pointer's value. */
|
|
- addr = flat_get_addr_from_rp(rp, relval, flags);
|
|
|
|
|
|
+ addr = flat_get_addr_from_rp(rp, relval, flags, &persistent);
|
|
if (addr != 0) {
|
|
if (addr != 0) {
|
|
/*
|
|
/*
|
|
* Do the relocation. PIC relocs in the data section are
|
|
* Do the relocation. PIC relocs in the data section are
|