aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/cc/dpchk.c28
-rw-r--r--src/cmd/ld/textflag.h10
2 files changed, 31 insertions, 7 deletions
diff --git a/src/cmd/cc/dpchk.c b/src/cmd/cc/dpchk.c
index 34163ff926..606bf40dd9 100644
--- a/src/cmd/cc/dpchk.c
+++ b/src/cmd/cc/dpchk.c
@@ -567,7 +567,19 @@ pragfpround(void)
void
pragtextflag(void)
{
- textflag = getnsn();
+ Sym *s;
+
+ s = getsym();
+ if(s == S) {
+ textflag = getnsn();
+ } else {
+ if(s->macro) {
+ macexpand(s, symb);
+ }
+ if(symb[0] < '0' || symb[0] > '9')
+ yyerror("pragma textflag not an integer");
+ textflag = atoi(symb);
+ }
while(getnsc() != '\n')
;
if(debug['f'])
@@ -577,7 +589,19 @@ pragtextflag(void)
void
pragdataflag(void)
{
- dataflag = getnsn();
+ Sym *s;
+
+ s = getsym();
+ if(s == S) {
+ dataflag = getnsn();
+ } else {
+ if(s->macro) {
+ macexpand(s, symb);
+ }
+ if(symb[0] < '0' || symb[0] > '9')
+ yyerror("pragma dataflag not an integer");
+ dataflag = atoi(symb);
+ }
while(getnsc() != '\n')
;
if(debug['f'])
diff --git a/src/cmd/ld/textflag.h b/src/cmd/ld/textflag.h
index 7b16865be4..64ae647fb6 100644
--- a/src/cmd/ld/textflag.h
+++ b/src/cmd/ld/textflag.h
@@ -7,13 +7,13 @@
// all agree on these values.
// Don't profile the marked routine. This flag is deprecated.
-#define NOPROF (1<<0)
+#define NOPROF 1
// It is ok for the linker to get multiple of these symbols. It will
// pick one of the duplicates to use.
-#define DUPOK (1<<1)
+#define DUPOK 2
// Don't insert stack check preamble.
-#define NOSPLIT (1<<2)
+#define NOSPLIT 4
// Put this data in a read-only section.
-#define RODATA (1<<3)
+#define RODATA 8
// This data contains no pointers.
-#define NOPTR (1<<4)
+#define NOPTR 16