mk: print symbol assembler file lines only once

Fixes #3461
This commit is contained in:
Christian Prochaska 2019-07-20 13:50:24 +02:00 committed by Christian Helmuth
parent 08ac64bba9
commit b9f0318ab8

View File

@ -153,13 +153,13 @@ endif
%.symbols.s: %.symbols
$(MSG_CONVERT)$@
$(VERBOSE)\
sed -e "s/^\(\w\+\) D \(\w\+\)\$$/.data; .global \1; .type \1,%object; .size \1,\2; \1:/p" \
-e "s/^\(\w\+\) V/.data; .weak \1; .type \1,%object; \1:/p" \
-e "s/^\(\w\+\) T/.text; .global \1; .type \1,%function; \1:/p" \
-e "s/^\(\w\+\) R \(\w\+\)\$$/.section .rodata; .global \1; .type \1,%object; .size \1,\2; \1:/p" \
-e "s/^\(\w\+\) W/.text; .weak \1; .type \1,%function; \1:/p" \
-e "s/^\(\w\+\) B \(\w\+\)\$$/.bss; .global \1; .type \1,%object; .size \1,\2; \1:/p" \
-e "s/^\(\w\+\) U/.text; .global \1; $(ASM_SYM_DEPENDENCY)/p" \
sed -e "s/^\(\w\+\) D \(\w\+\)\$$/.data; .global \1; .type \1,%object; .size \1,\2; \1:/" \
-e "s/^\(\w\+\) V/.data; .weak \1; .type \1,%object; \1:/" \
-e "s/^\(\w\+\) T/.text; .global \1; .type \1,%function; \1:/" \
-e "s/^\(\w\+\) R \(\w\+\)\$$/.section .rodata; .global \1; .type \1,%object; .size \1,\2; \1:/" \
-e "s/^\(\w\+\) W/.text; .weak \1; .type \1,%function; \1:/" \
-e "s/^\(\w\+\) B \(\w\+\)\$$/.bss; .global \1; .type \1,%object; .size \1,\2; \1:/" \
-e "s/^\(\w\+\) U/.text; .global \1; $(ASM_SYM_DEPENDENCY)/" \
$< > $@
#