aboutsummaryrefslogtreecommitdiffstats
path: root/src/dtddata.S
Commit message (Collapse)AuthorAgeFilesLines
* build: replace assembly embedding with Python scriptSimon Ser2021-05-101-50/+0
| | | | | | | | This allows Meson to properly track dependencies and re-build the scanner when editing the dtd. We also stop depending on GNU as' .incbin and make the embedding less obscure. Signed-off-by: Simon Ser <contact@emersion.fr>
* dtddata: Use standard permission noticeYong Bakos2017-01-261-16/+19
| | | | | Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* scanner: avoid executable stackPekka Paalanen2016-03-021-0/+8
| | | | | | | | | | | | | | | | | Before this patch: $ scanelf -lpqe ./wayland-scanner RWX --- --- ./wayland-scanner That indicates the stack is executable, which is a bad thing for security. Wayland-scanner does not actually need an executable stack, it is just an oversight from using an .S file in the sources. Add a special incantation in dtddata.S to make it not cause the stack to become executable. Reported-by: Mart Raudsepp <leio@gentoo.org> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Tested-by: Mart Raudsepp <leio@gentoo.org>
* scanner: drop altmacro from dtddata.SPekka Paalanen2015-11-191-9/+8
| | | | | | | | | | | | | | | | Stop using .altmacro in dtddata.S, because clang does not yet implement it. Turns out that we do not actually seem to need it, and we can modify the syntax to work without it. Moving the double quotes from the binfile line to the .incbin line is required to avoid the assembler error "missing string". Instead of & we now use \() to mark the end of macro argument name. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92988 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Tested-by: Víctor Jáquez <vjaquez@igalia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
* Validate the protocol xml during scanningPeter Hutterer2015-11-171-0/+40
Embed the wayland.dtd protocol data into the scanner binary so we can validate external protocol files without requiring makefile changes. Hat-tip to Pekka Paalanen for the embedding trick. The embedding trick doesn't work well if the to-be-embedded file is in a different location than the source file, so copy/link it during configure and then build it in from the local directory. The current expat parser is not a validating parser, moving scanner.c to another parser has the risk of breaking compatibility. This patch adds libxml2 as extra (optional) dependency, but that also requires parsing the input twice. If the protocol fails validation a warning is printed but no error is returned otherwise. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>