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: PATCH: PR ld/4090: Can't use ADDR on section after


On Mon, Apr 02, 2007 at 04:04:03PM +0100, Nick Clifton wrote:
> Hi H.J.
> 
> >2007-03-31  H.J. Lu  <hongjiu.lu@intel.com>
> >
> >	PR ld/4090
> >	* ldexp.h (node_type): Add lineno.
> >	* ldexp.c: Include "ldlex.h".
> >	(exp_intop): Set the lineno field from lineno.
> >	(exp_bigintop): Likewise.
> >	(exp_relop): Likewise.
> >	(exp_nameop): Likewise.
> >	(exp_binop): Set the lineno field from lineno of lhs.
> >	(exp_trinop): Likewise.
> >	(exp_unop): Set the lineno field from lineno of child.
> >	(exp_assop): Set the lineno field from lineno of src.
> >	(exp_provide): Likewise.
> >	(exp_assert): Set the lineno field from lineno of exp.
> >	(exp_get_abs_int): Set lineno from lineno of nonconstant
> >	expression when report problem.
> 
> How did you test this patch ?  Do any linker testsuite tests need 
> updating because of the improved line number reporting ?

I ran "make check" as well as the testcase in PR 4090. There are
no new failures in binutils testcases and I got

bash-3.1$ cat foo.t
SECTIONS
{
  .bar : AT ((ADDR(.foo) + 4095) & ~(4095)) { *(.bar) }
  .foo : { *(.foo) }
  /DISCARD/ : { *(.*) }
}
bash-3.1$ cat foo.s
        .section .bar,"ax","progbits"
        .byte 0
        .section .foo,"aw","progbits"
        .byte 0
bash-3.1$ make
as --32  -o foo.o foo.s
./ld -m elf_i386 -o foo -T foo.t foo.o
foo.t:3: nonconstant expression for load base
make: *** [foo] Error 1
bash-3.1$ 


H.J.


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