Only look for linkerscripts in the same dir as the asm file

This commit is contained in:
ISSOtm
2024-02-18 22:55:19 +01:00
parent efaef7039e
commit 4064e4a7a9
3 changed files with 8 additions and 6 deletions

View File

@@ -1,2 +1,2 @@
error: ./linkerscript-escapes-test.link(4): Cannot escape character '{' error: linkerscript-escapes-test.link(4): Cannot escape character '{'
Linking failed with 1 error Linking failed with 1 error

View File

@@ -1,2 +1,2 @@
error: ./section-attributes-mismatch.link(3): The linker script assigns section "sec" to address $0018, but that would be ALIGN[4, 8] instead of the requested ALIGN[4, 2] error: section-attributes-mismatch.link(3): The linker script assigns section "sec" to address $0018, but that would be ALIGN[4, 8] instead of the requested ALIGN[4, 2]
Linking failed with 1 error Linking failed with 1 error

View File

@@ -80,13 +80,15 @@ for i in *.asm; do
fi fi
# Other tests have several linker scripts # Other tests have several linker scripts
while read -rd '' script; do for script in "${i%.asm}"*.link; do
[[ -e "$script" ]] || break # If the glob doesn't match, it just... doesn't expand!
rgblinkQuiet -l "$script" -o "$gbtemp" "$otemp" >"$outtemp" 2>&1 rgblinkQuiet -l "$script" -o "$gbtemp" "$otemp" >"$outtemp" 2>&1
tryDiff "${script%.link}.out" "$outtemp" tryDiff "${script%.link}.out" "$outtemp"
(( rc = rc || $? )) (( rc = rc || $? ))
ran_flag=1 ran_flag=true
done < <(find . -name "${i%.asm}*.link" -print0) done
if [ -n "$ran_flag" ]; then if "$ran_flag"; then
continue continue
fi fi