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] Copy symbol flags when doing an assignment with a ternary operator.


On Mon, Oct 19, 2015 at 3:15 AM, Simon Dardis <Simon.Dardis@imgtec.com> wrote:
> Hello,
>
> My apologies, I should have supplied a testcase. Testcase below, passes
> on mips-img-elf, mips-mti-elf, mips-img-linux-gnu, sparc-linux-gnu and
> x86_64-linux-gnu.
>
>
> Thanks,
> Simon
>
> ld/testsuite/
>         * ld-elf/attributes.d: New test for symbol attribute copying.
>         * ld-elf/attributes.ld: Part of above.
>         * ld-elf/attributes.s: Likewise.
>
> diff --git a/ld/testsuite/ld-elf/attributes.d b/ld/testsuite/ld-elf/attributes.d
> new file mode 100644
> index 0000000..6356bbe
> --- /dev/null
> +++ b/ld/testsuite/ld-elf/attributes.d
> @@ -0,0 +1,8 @@
> +#name: Symbol flags copy
> +#ld: -T attributes.ld
> +#objdump: -t
> +
> +#...
> +0+0000000 g     F .text        0+0000000 __start
> +0+0000000 g     F .text        0+0000000 start
> +#pass
> diff --git a/ld/testsuite/ld-elf/attributes.ld b/ld/testsuite/ld-elf/attributes.ld
> new file mode 100644
> index 0000000..f6cfe4a
> --- /dev/null
> +++ b/ld/testsuite/ld-elf/attributes.ld
> @@ -0,0 +1,9 @@
> +PROVIDE ( __start = DEFINED(start) ? start : 0xbfc00000);
> +ENTRY (__start)
> +SECTIONS
> +{
> +  .text :
> +  {
> +    *(.text)
> +  }
> +}
> diff --git a/ld/testsuite/ld-elf/attributes.s b/ld/testsuite/ld-elf/attributes.s
> new file mode 100644
> index 0000000..bb47536
> --- /dev/null
> +++ b/ld/testsuite/ld-elf/attributes.s
> @@ -0,0 +1,5 @@
> +       .text
> +       .globl  start
> +       .type   start, %function
> +start:
> +       .byte 0
> --
> 2.1.0
>

You need to tests both true and false.


-- 
H.J.


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