mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 11:39:26 +08:00
Do not allow .globl to override .section
This commit is contained in:
@ -1824,6 +1824,17 @@ S_SET_EXTERNAL (s)
|
|||||||
/* Let .weak override .global. */
|
/* Let .weak override .global. */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (s->bsym->flags & BSF_SECTION_SYM)
|
||||||
|
{
|
||||||
|
char * file;
|
||||||
|
unsigned int line;
|
||||||
|
|
||||||
|
/* Do not reassign section symbols. */
|
||||||
|
as_where (& file, & line);
|
||||||
|
as_warn_where (file, line,
|
||||||
|
_("Section symbols are already global"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
s->bsym->flags |= BSF_GLOBAL;
|
s->bsym->flags |= BSF_GLOBAL;
|
||||||
s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
|
s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user