projects
/
platform
/
upstream
/
nasm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d485cb
)
coff: Issue fatal signal on relocations more then 0xffff
author
Cyrill Gorcunov
<gorcunov@gmail.com>
Fri, 5 Nov 2010 23:45:45 +0000
(
02:45
+0300)
committer
Cyrill Gorcunov
<gorcunov@gmail.com>
Fri, 5 Nov 2010 23:45:45 +0000
(
02:45
+0300)
Actually it's temporary action. We have to support more
relocations then that but it requires some more code rework.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
output/outcoff.c
patch
|
blob
|
history
diff --git
a/output/outcoff.c
b/output/outcoff.c
index
5b232bb
..
a089b20
100644
(file)
--- a/
output/outcoff.c
+++ b/
output/outcoff.c
@@
-939,6
+939,10
@@
static void coff_section_header(char *name, int32_t vsize,
fwriteint32_t(datapos, ofile);
fwriteint32_t(relpos, ofile);
fwriteint32_t(0L, ofile); /* no line numbers - we don't do 'em */
+
+ if (nrelocs >= IMAGE_SCN_MAX_RELOC)
+ nasm_error(ERR_FATAL, "Too many relocations (%d)\n", nrelocs);
+
fwriteint16_t(nrelocs, ofile);
fwriteint16_t(0, ofile); /* again, no line numbers */
fwriteint32_t(flags, ofile);