This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Question about keywords and declarations in assembly code
"Jafa" <jafa@silicondust.com> writes:
> The way I figure it if you have two global variables of the same name then
> you should get a linker error... merging the two may be the worst thing it
> can do. Maybe there is some obscure C spec that requires this - hopfully
> someone will clarify.
There is no spec for it, but it is traditional Unix linker behaviour.
The C standard permits it as an extension. Existing programs depend
on it.
If you don't like it, use the linker --warn-common option.
Ian