[PATCH] gas: copy st_size only if unset
Jan Beulich
jbeulich@suse.com
Thu Mar 31 06:22:09 GMT 2022
On 31.03.2022 05:37, Fangrui Song wrote:
> For
> ```
> .size foo1, 1
> foo1:
>
> .set bar1, foo1
> .size bar1, 2
> .size bar2, 2
> .set bar2, foo1
>
> .set bar3, foo2
> .size bar3, 2
> .size bar4, 2
> .set bar4, foo2
>
> .size foo2, 1
> foo2:
> ```
>
> bar1's size is 2 while bar2, bar3, bar4's is 1. The behavior of bar1 makes sense
> (generally directives on the new symbol should win) and is relied upon by glibc
> stdio-common/errlist.c:
But what about
foo1:
.size foo1, 1
foo2:
.size foo2, 2
.set bar, foo1
.set bar, foo2
I would think bar's size should end up being 2 in this case, whereas I
think it would end up being 1 with your change.
Jan
More information about the Binutils
mailing list