summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorChang S. Bae <changseok.bae@gmail.com>2018-10-08 18:49:52 -0700
committerCyrill Gorcunov <gorcunov@gmail.com>2018-10-09 10:22:53 +0300
commit625ea1ca4784f05bccab90a259c301d03f5149bb (patch)
tree605d6e3cc65b93bda17f0424892aa7a94953cc07 /output
parente859ece3784245b1bd19f19bacc1f510f84c8d07 (diff)
downloadnasm-625ea1ca4784f05bccab90a259c301d03f5149bb.tar.gz
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>
Diffstat (limited to 'output')
-rw-r--r--output/outmacho.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/output/outmacho.c b/output/outmacho.c
index 368a56a4..784ad0fe 100644
--- a/output/outmacho.c
+++ b/output/outmacho.c
@@ -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;