macho/reloc: Adjust SUB relocation information
As SUB relocation getting deprecated, reset external reference seems to be enough. Also, print a warning message for this. Based-on-code-from: zenith432 <zenith432@users.sourceforge.net> Signed-off-by: Chang S. Bae <changseok.bae@gmail.com>
This commit is contained in:
parent
e859ece378
commit
625ea1ca47
1 changed files with 4 additions and 2 deletions
|
@ -551,8 +551,10 @@ static int64_t add_reloc(struct section *sect, int32_t section,
|
|||
}
|
||||
break;
|
||||
|
||||
case RL_SUB:
|
||||
r->pcrel = 0;
|
||||
case RL_SUB: /* obsolete */
|
||||
nasm_error(ERR_WARNING, "relcation with subtraction"
|
||||
"becomes to be obsolete");
|
||||
r->ext = 0;
|
||||
r->type = X86_64_RELOC_SUBTRACTOR;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue