[Bug ld/12565] NOLOAD sections empty

2014-09-24 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=12565

Christian Bruel  changed:

   What|Removed |Added

 CC||chrbr at gcc dot gnu.org

--- Comment #21 from Christian Bruel  ---
hello,

A little up. For 2.24.51.0.3

We have another usage of NOLOAD with a port of the remote proc framework.
If the behavior to clear a NOLOAD section is confirmed, an update of
documentation would indeed help. This one was quite confusing, in particular
after a change in behavior

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17505] New: arm: bad static label resolution from different modes

2014-10-23 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505



Bug ID: 17505

   Summary: arm: bad static label resolution from different modes

   Product: binutils

   Version: 2.24

Status: NEW

  Severity: normal

  Priority: P2

 Component: ld

  Assignee: unassigned at sourceware dot org

  Reporter: chrbr at gcc dot gnu.org



Created attachment 7843

  --> https://sourceware.org/bugzilla/attachment.cgi?id=7843&action=edit

test to reproduce



While working on the attribute_target GCC attribute, I find myself calling a

static THUMB function while in ARM mode, or vice versa.



(this works fine when functions are .global)



Using the attached .s example, with 

foo:



.thumb_func

.typebar, %function





 the relocations are in the object



 :

  :

   0:ebfe bl0 

0: R_ARM_CALLfoo

   4:ebfe bl0 

4: R_ARM_CALLbar



is resolved in the final binary as:



Disassembly of section .text:



8018 :

8018:eb85 bl8234 

801c:fa84 blx8234 



instead of bl 



What is surprising is that the linker correctly patches the BL/BLX

instructions, itś just the address that is wrong. I´m wondering i
f this can be

fixed in the linker machinery to handle interwork or have the assembly emit
 a

R_ARM_THM_CALL reloc 



assembled/linked with :



arm-none-eabi-gcc  1.s -o 1.u



-- 

You are receiving this mail because:

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17505] arm: bad static label resolution from different modes

2014-10-31 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505

--- Comment #2 from Christian Bruel  ---
Created attachment 7866
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7866&action=edit
tentative patch

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17505] arm: bad static label resolution from different modes

2014-10-31 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505

--- Comment #1 from Christian Bruel  ---
Encoding a BFD_RELOC_ARM_PCREL_BLX instead of a BFD_RELOC_ARM_PCREL_CALL for
static calls between arm to thumb fixed the problem.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17505] arm: bad static label resolution from different modes

2014-10-31 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505

--- Comment #4 from Christian Bruel  ---
Created attachment 7868
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7868&action=edit
the c input

causing the situation, for reference (need attribute target support)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17505] arm: bad static label resolution from different modes

2014-10-31 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505

--- Comment #3 from Christian Bruel  ---
Created attachment 7867
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7867&action=edit
New test

compiles with arm-none-eabi-gcc -march=armv7-a 1.s 

previous objdump was :

801c:eb8a bl824c 
8020:e1a03000 movr3, r0
8024:fa8c blx825c 
8028:e0833000 addr3, r3, r0
802c:eb89 bl8258 

now :

801c:eb8a bl824c 
8020:e1a03000 movr3, r0
8024:fa8a blx8254 
8028:e0833000 addr3, r3, r0
802c:eb89 bl8258 

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17505] arm: bad static label resolution from different modes

2014-11-05 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505

--- Comment #6 from Christian Bruel  ---
(In reply to Richard Earnshaw from comment #5)
> (In reply to Christian Bruel from comment #1)
> > Encoding a BFD_RELOC_ARM_PCREL_BLX instead of a BFD_RELOC_ARM_PCREL_CALL for
> > static calls between arm to thumb fixed the problem.
> 
> That sounds wrong.

it is indeed, fixed locally but many other regressions. 

> 
> Which architecture revision are you targeting?

v7 and v5

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17505] arm: bad static label resolution from different modes

2014-11-05 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505

--- Comment #8 from Christian Bruel  ---
sorry, the first test was only illustrative, but not completed. the fact that
the addresses are the same is just because I reduced the code. 

Here is the complete attachment, here the code is : 

8240 :
8240:e30b3178 movwr3, #45432; 0xb178
8244:e3e0207e mvnr2, #126; 0x7e
8248:e3403001 movtr3, #1
824c:e5933000 ldrr3, [r3]
8250:e5c32000 strbr2, [r3]
8254:e12fff1e bxlr

8258 :
8258:4770  bxlr
825a:bf00  nop

and main calls : 

8018 :
8018:e92d4010 push{r4, lr}
801c:fa93 blx8270 
8020:eb86 bl8240 
8024:e3a0 movr0, #0
8028:e8bd8010 pop{r4, pc}

so

 blbar

is in the .o

   4:eb04 bl30 
4: R_ARM_CALLbar

instead of just bl30 <0x18>

looks like a wrong addend to the start of the section.

to reproduce:

arm-none-eabi-gcc -march=armv7-a 2.s -c -o 1.o
arm-none-eabi-objdump -dr 1.o | grep bar

arm-none-eabi-gcc -march=armv7-a 2.s -o 1.u
arm-none-eabi-objdump -dr 1.u

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17505] arm: bad static label resolution from different modes

2014-11-05 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505

Christian Bruel  changed:

   What|Removed |Added

   Attachment #7843|0   |1
is obsolete||
   Attachment #7867|0   |1
is obsolete||

--- Comment #9 from Christian Bruel  ---
Created attachment 7903
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7903&action=edit
complete runable assembly

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17505] arm: bad static label resolution from different modes

2014-11-06 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505

--- Comment #10 from Christian Bruel  ---
in the .o dump bar is at

   .text
 :
   ...
0018 :

but the call to bar resolves:

  4:eb04 bl30 
4: R_ARM_CALLbar


why the +0x18 addend ? 

it shoud be either bl 

or just (prefered) bl 

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/17505] arm: bad static label resolution from different modes

2014-11-06 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505

Christian Bruel  changed:

   What|Removed |Added

  Component|ld  |gas

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/17505] arm: bad static label resolution from different modes

2015-09-21 Thread chrbr at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17505

Christian Bruel  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Christian Bruel  ---
gcc 6.0.0 fixed to resolve interwork static thumb2 calls, so the linker fixup
is not needed anymore.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/11542] ld -r generates R_X86_64_NONE

2011-05-11 Thread chrbr at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=11542

--- Comment #4 from Christian Bruel  2011-05-11 
10:50:54 UTC ---
Created attachment 5715
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5715
part-1

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/11542] ld -r generates R_X86_64_NONE

2011-05-11 Thread chrbr at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=11542

--- Comment #5 from Christian Bruel  2011-05-11 
10:52:35 UTC ---
Created attachment 5716
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5716
part-2

Reproduce with:

g++ -fasynchronous-unwind-tables -fno-rtti -fno-exceptions -c -o foo.o foo.i
g++ -fasynchronous-unwind-tables -fno-rtti -fno-exceptions -c -o bar.o bar.i

ld   -r -o foor.o foo.o bar.o

objdump -r foor.o | grep NONE
0098 R_X86_64_NONE *ABS*

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/11542] ld -r generates R_X86_64_NONE

2011-05-11 Thread chrbr at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=11542

Christian Bruel  changed:

   What|Removed |Added

 CC||chrbr at gcc dot gnu.org

--- Comment #6 from Christian Bruel  2011-05-11 
10:58:20 UTC ---
A new reduced case showing R_*_NONE relocation in .eh_frame for a relocatable
module. 
Might not be a bug (R_*NONE should be allowed in the final ELF, but since this
has not been covered by the patch in #2, I wonder if there is a solution to
cleanup this one as well.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils