silo: Build with -fno-PIC to reduce size
Matt Turner
maintainerPATCH 1/5 silo: Build with -fno-PIC to reduce size
Otherwise the resulting image will be too large:
| ./util second.map second.aout second2.aout second.b second.b2 | Distance between two changes larger than 63K 3 84553 0
Signed-off-by Matt Turner <[email protected]>
--- Rules.make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Rules.make +1 -1
@@ -19,7 +19,7 @@ cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "y"; else echo "n"; fi;) CFLAGS = -Os -Wall -I. -I../include -fomit-frame-pointer \ - -fno-strict-aliasing -DSMALL_RELOC=$(SMALL_RELOC) \ + -fno-strict-aliasing -fno-PIC -DSMALL_RELOC=$(SMALL_RELOC) \ -DLARGE_RELOC=$(LARGE_RELOC) HOSTCFLAGS = -O2 -Wall
Signature · 1 line
2.24.1
Matt Turner
maintainerPATCH 2/5 silo: Build with -U_FORTIFY_SOURCE
Otherwise the build will fail:
| ld: decompnet.o: in function `error':
| decomp.c:(.text+0x4dc): undefined reference to `__longjmp_chk'
Signed-off-by Matt Turner <[email protected]>
--- Rules.make | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Rules.make +2 -1
@@ -19,7 +19,8 @@ cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "y"; else echo "n"; fi;) CFLAGS = -Os -Wall -I. -I../include -fomit-frame-pointer \ - -fno-strict-aliasing -fno-PIC -DSMALL_RELOC=$(SMALL_RELOC) \ + -fno-strict-aliasing -fno-PIC -U_FORTIFY_SOURCE \ + -DSMALL_RELOC=$(SMALL_RELOC) \ -DLARGE_RELOC=$(LARGE_RELOC) HOSTCFLAGS = -O2 -Wall
Signature · 1 line
2.24.1
Matt Turner
maintainerPATCH 3/5 silo: Fix misleading indentation
In reply to Matt TurnerSigned-off-by Matt Turner <[email protected]>
--- common/stringops1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/stringops1.c +1 -1
@@ -74,7 +74,7 @@ int strlen(const char *s) {const char *sc;for (sc = s; *sc !='\0' ; ++sc); -return sc - s; +return sc - s; }int strncmp (const char *cs,const char *ct,size_t count)
Signature · 1 line
2.24.1
Matt Turner
maintainerPATCH 4/5 second: Fix typo'd operator
In reply to Matt TurnerSigned-off-by Matt Turner <[email protected]>
--- second/disk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
second/disk.c +1 -1
@@ -293,7 +293,7 @@ int silo_disk_read(char *buff, int size, unsigned long long offset)if (!net) {if (prom_vers !=PROM_P1275 ) {if (((romvec->pv_printrev >>16 ) <2 || - ((romvec->pv_printrev >>16 ) ==2 && (romvec->pv_printrev &&0xffff ) <6 )) + ((romvec->pv_printrev >>16 ) ==2 && (romvec->pv_printrev &0xffff ) <6 )) && offset >=0x40000000 ) {printf ("Buggy old PROMs don't allow reading past 1GB from start of the disk. Send complaints to SMCC\n" );return -1 ;
Signature · 1 line
2.24.1
Matt Turner
maintainerPATCH 5/5 second/util: Remove unused shadowed variables
In reply to Matt TurnerSigned-off-by Matt Turner <[email protected]>
--- second/util.c | 2 -- 1 file changed, 2 deletions(-)
second/util.c +0 -2
@@ -120,8 +120,6 @@ int main(int argc, char **argv)int end, rodata_start, rodata_end;int net =0 ;int i =1 ; -char sym[256 ]; -unsigned int addr;if (!strcmp (argv[i],"-a" )) { net =1 ;
Signature · 1 line
2.24.1
Matt Turner
maintainerQuoted 1 line · Matt Turner
*Sigh*
Sent to the wrong mailing list. My apologies.