This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] .fill does not accept forward labels


>>> On 06.10.17 at 13:50, <krebbel@linux.vnet.ibm.com> wrote:
> On 10/06/2017 01:43 PM, Jan Beulich wrote:
>>>>> On 06.10.17 at 13:25, <krebbel@linux.vnet.ibm.com> wrote:
>>> Hi,
>>>
>>> running gas on: (x86-64)
>>>
>>> .global _start
>>> .text
>>> .fill (2f-1f), 1, 0x90
>>> 1:
>>>         nop
>>> 2:
>>>
>>> produces:
>>>
>>> t.s: Assembler messages:
>>> t.s:3: Warning: symbol ".L21" undefined; zero assumed
>>>
>>> ... while it works fine with backward references. Other pseudo commands like 
> 
>>> .skip work for both.
>>>
>>> A quick hack fixes this for me without causing testsuite regressions on 
>>> x86-64. However, the current
>>> code looks intentional to me. Does anybody know what the reason is for 
>>> erroring out if the symbol
>>> isn't known yet?
>> 
>> If the label changes position during later processing (e.g. relaxation),
>> your fill range would end up being wrong.
> 
> But wouldn't this apply to e.g. .skip as well? With .skip a forward 
> reference is accepted.

Hmm, odd.

Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]