shithub: scc

Download patch

ref: a634369fb989684a8080794e9a96cf34b6ff81d6
parent: 95d704d06828e99541170b8f5bfc97240d31b79d
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat Oct 30 08:06:33 EDT 2021

libmach: Fix compilation error

elf64getsec() depended of the old SSHARED flag that is
not used anymore.

--- a/include/scc/scc/mach.h
+++ b/include/scc/scc/mach.h
@@ -14,7 +14,6 @@
 	SALLOC  = 1 << 4,
 	SRELOC  = 1 << 5,
 	SABS    = 1 << 6,
-	SSHARED = 1 << 7,
 };
 
 enum symtype {
--- a/src/libmach/elf64/elf64getsec.c
+++ b/src/libmach/elf64/elf64getsec.c
@@ -42,10 +42,8 @@
 		sflags |= SALLOC|SREAD;
 	if (type != SHT_NOBITS)
 		sflags |= SLOAD;
-	if (flags & SHF_MERGE)
-		sflags |= SSHARED; /* TODO: Check SSHARED in coff */
 	if (stype == 'T' || stype == 'D')
-		sflags |= SRELOC;  /* TODO: Check SRELOC in coff */
+		sflags |= SRELOC;
 
 	sec->name = elf64str(obj, SEC_STRTBL, shdr->sh_name);
 	sec->index = n;