so that it can be put at a fixed address
CC = $(CROSS)gcc
LD = $(CROSS)ld
OBJCOPY = $(CROSS)objcopy
-CFLAGS = -O3 -Wall -Wextra
+CFLAGS = -O3 -Wall -Wextra -mno-vsx
AFLAGS ?= -mpwr9
SRCDIR = src
-SOURCES := $(SRCDIR)/xchacha20.c $(SRCDIR)/svp64test.c
+SOURCES := $(SRCDIR)/svp64test.c $(SRCDIR)/xchacha20.c
OBJECTS := $(SOURCES:$(SRCDIR)/%.c=$(SRCDIR)/%.o)
OBJ = chacha20test.bin
export DUMP = /tmp/out
# commented for luke's convenience
-#export SILENCELOG = 1
+# export SILENCELOG = 1
all: tests
MEMORY
{
- ram : ORIGIN = 0x20000000, LENGTH = 512M
+ ram : ORIGIN = 0x20001000, LENGTH = 512M
+ fixedaddr : ORIGIN = 0x20000000, LENGTH = 0x1000
}
+
SECTIONS
{
+ .fixedaddr :
+ {
+ . = ALIGN(4);
+ __fixedaddr_start__ = .;
+ *(.fixedaddr*)
+ __fixedaddr_end__ = .;
+ } > fixedaddr
.text : { *(.text*) } > ram
.bss : { *(.text*) } > ram
}
return(0);
}
-int main(void){
+#define LOCATE_FUNC __attribute__((__section__(".fixedaddr")))
+
+int LOCATE_FUNC main(int argc, char **argv[]){
return check_cpp();
}
+
uint8_t tmp[64];
uint32_t i;
+ return;
+
if (!bytes) return;
j0 = ctx->input[0];