[riot-notifications] [RIOT-OS/RIOT] makefiles/blobs: Add rules for binary blob embedding. (#11497)

Kaspar Schleiser notifications at github.com
Fri May 10 12:00:53 CEST 2019

kaspar030 commented on this pull request.

> +# -z noexecstack adds a .note.GNU_STACK to mark the stack as not executable.
+# AFAIK this only matters in native and its absence only causes the stack to
+# be marked executable in the final application binary (slight security issue).
+LD_BLOBFLAGS ?= -r -b binary -z noexecstack
+ifeq (native,$(BOARD))
+  LD_BLOBFLAGS += -m elf_i386
+BLOB_SECTION ?= .rodata,alloc,load,readonly,data,contents
+OBJCOPY_RENAMEFLAGS ?= --rename-section .data=$(BLOB_SECTION)
+$(BLOBS:%=$(BLOB_PATH)/%.o.tmp): $(BLOB_PATH)/%.o.tmp: % | $(BLOB_PATH)/

Why use ld at all? objcopy can also create .o from blobs with a similar naming scheme.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190510/e88d1019/attachment.html>

More information about the notifications mailing list