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] | |
Hi,
This patch handles difference expression between a symbol and an
undefined symbol better so that we can assemble something like:
.section .data.i,"a"
i:
.long 0
.section .data.j,"a"
j:
.long i - (. - .L1)
.L1:
The problem with the above code is that .L1 in "i - (. - L1)" is a
forward reference. The current code in expr() evaluate this to
something belonging to section .data.j, That causes a subsequent
failure in segment check because i is defined in another section.
-Doug
gas/ChangeLog:
2010-09-27 Doug Kwan <dougkwan@google.com>
* expr.c (expr): Handle difference between a symbol and an undefined
symbol specially.
gas/testsuite/ChangeLog:
2010-09-27 Doug Kwan <dougkwan@google.com>
* gas/arm/got_prel2.d: New.
* gas/arm/got_prel2.s: New.
Attachment:
patch-und-diff.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |