commit 44391250aeae042fa5d3b49303ae1a967d56f28e
parent dfdf911e7e3dbfe3f8dcc519a4e9a7bf2b58e032
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sun, 12 Jan 2025 11:54:01 +0100
as: Fix text, data and bss definitions
These three segments are relocatable but we didn't have
a way to mark new sections as relocatable and for that
reason we needed a new specifier.
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/cmd/scc-as/symbol.c b/src/cmd/scc-as/symbol.c
@@ -256,7 +256,9 @@ secflags(char *attr)
case 'a':
flags |= SABS;
break;
- /* TODO: What happens with SRELOC ? */
+ case 'm':
+ flags |= SRELOC;
+ break;
default:
abort();
}
@@ -385,9 +387,9 @@ ibinfmt(void)
exit(EXIT_FAILURE);
}
- stext = defsec(".text", "rxcl");
- sdata = defsec(".data", "rwcl");
- sbss = defsec(".bss", "rwc");
+ stext = defsec(".text", "mrxcl");
+ sdata = defsec(".data", "mrwcl");
+ sbss = defsec(".bss", "mrwc");
}
void