libmach/coff32: Rename F_SYMS to F_LSYMS - scc - simple c99 compiler
 (HTM) git clone git://git.simple-cc.org/scc
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 4c8a466ddf23cf1db739c35b6cef305f053c83cb
 (DIR) parent a10811325601d16f25a9afe146831e371b2fe076
 (HTM) Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
       Date:   Thu, 21 Mar 2024 10:41:29 +0100
       
       libmach/coff32: Rename F_SYMS to F_LSYMS
       
       The documentation and other libraries use F_LSYMS and it is more
       orthogonal with F_RELFLG and F_LMNO that use the letter L to mark
       that they were stripped from the binary.
       
       Diffstat:
         M include/scc/scc/coff32/filehdr.h    |       2 +-
         M src/libmach/coff32/coff32getsym.c   |       2 +-
         M src/libmach/coff32/coff32setsym.c   |       2 +-
         M src/libmach/coff32/coff32strip.c    |       2 +-
       
       4 files changed, 4 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/include/scc/scc/coff32/filehdr.h b/include/scc/scc/coff32/filehdr.h
       @@ -16,7 +16,7 @@ struct filehdr {
        #define F_RELFLG          0000001
        #define F_EXEC            0000002
        #define F_LMNO            0000004
       -#define F_SYMS            0000010
       +#define F_LSYMS           0000010
        #define F_MINMAL          0000020
        #define F_UPDATE          0000040
        #define F_SWADB           0000100
 (DIR) diff --git a/src/libmach/coff32/coff32getsym.c b/src/libmach/coff32/coff32getsym.c
       @@ -71,7 +71,7 @@ coff32getsym(Obj *obj, int *idx, Symbol *sym)
                Coff32 *coff = obj->data;
                FILHDR *hdr = &coff->hdr;
        
       -        if ((hdr->f_flags & F_SYMS) != 0 || n >= coff->hdr.f_nsyms)
       +        if ((hdr->f_flags & F_LSYMS) != 0 || n >= coff->hdr.f_nsyms)
                        return NULL;
        
                ent = &coff->ents[n];
 (DIR) diff --git a/src/libmach/coff32/coff32setsym.c b/src/libmach/coff32/coff32setsym.c
       @@ -82,7 +82,7 @@ coff32setsym(Obj *obj, int *idx, Symbol *sym)
                Coff32 *coff = obj->data;
                FILHDR *hdr = &coff->hdr;
        
       -        hdr->f_flags |= F_SYMS;
       +        hdr->f_flags &= ~F_LSYMS;
                if (n >= coff->hdr.f_nsyms) {
                        if (n > LONG_MAX-1)
                                return NULL;
 (DIR) diff --git a/src/libmach/coff32/coff32strip.c b/src/libmach/coff32/coff32strip.c
       @@ -24,7 +24,7 @@ coff32strip(Obj *obj)
        
                hdr->f_nsyms = 0;
                hdr->f_symptr = 0;
       -        hdr->f_flags |= F_RELFLG | F_LMNO | F_SYMS;
       +        hdr->f_flags |= F_RELFLG | F_LMNO | F_LSYMS;
        
                free(coff->ents);
                free(coff->rels);