#2802 closed defect (fixed)
Test "libdl (RTL) 5" fails on SPARC targets
Reported by: | Sebastian Huber | Owned by: | Chris Johns |
---|---|---|---|
Priority: | normal | Milestone: | 5.1 |
Component: | lib/dl | Version: | 5 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
On GR740 I get:
rtl: RELOC_32 0x60ae8 @ 0x86edc in /dl-o5.o rtl: relocation: .rela.eh_frame, syms:.symtab rtl: rela: sym:__gxx_personality_v0(20)=00001dec type:3 off:00000013 addend:0 CPU 0: IU in error mode (tt = 0x07, mem address not aligned) 0x0001fa9c: c4040000 ld [%l0], %g2 <rtems_rtl_elf_relocate_rela+204> CPU 1: Power down mode CPU 2: Power down mode CPU 3: Power down mode
On GR712RC I get:
rtl: WDISP_30 0x7ffe2ccd @ 0x40087108 in /dl-o5.o rtl: relocation: .rela.gcc_except_table.exception_dl, syms:.symtab rtl: rela: sym:_ZTISt9exception(32)=40060ae8 type:3 off:00000034 addend:0 rtl: RELOC_32 0x40060ae8 @ 0x400871b4 in /dl-o5.o rtl: relocation: .rela.eh_frame, syms:.symtab rtl: rela: sym:__gxx_personality_v0(20)=40001dec type:3 off:00000013 addend:0
Target resets now.
Attachments (1)
Change History (12)
comment:1 Changed on 11/10/16 at 05:39:59 by Chris Johns
comment:2 Changed on 11/10/16 at 07:32:09 by Sebastian Huber
Is this a bug in the tool chain or the libdl?
comment:3 Changed on 11/10/16 at 07:46:01 by Chris Johns
I am investigating. At this stage it looks like a bug in gas. Binutils contain code that checks the lower bits of the address and selects either R_SPARC_32 or UA32. I am looking to make a suitable test case so I can see what is happening.
comment:4 Changed on 11/11/16 at 05:50:10 by Chris Johns
Changed on 11/11/16 at 06:09:35 by Chris Johns
Attachment: | libdl-sparc-R_SPARC_32-missaligned.patch added |
---|
Miss-aligned R_SPARC_32 offset work around.
comment:5 Changed on 11/11/16 at 06:10:48 by Chris Johns
I have attached a work-around which allows dl05 to run and fail in the expected manner.
We can review the status of this patch once we get some feedback from the binutil's community.
comment:6 Changed on 11/14/16 at 14:24:08 by Jiri Gaisler <jiri@…>
comment:7 Changed on 11/22/16 at 06:41:39 by Sebastian Huber
Now the test terminates with
rtl: UA_32 0x8c6d8 @ 0x8c755 in /dl-o5.o rtl: alloc: del: SYMBOL addr=0x8c780 rtl: alloc: new: OBJECT addr=0x8c7e8 size=132 rtl: linkmap_add rtl: unresolv: global resolve dlopen: dlsym: exception_base called exception_dl: throwing terminate called after throwing an instance of 'std::runtime_error' what(): exception_dl throw
comment:8 Changed on 11/22/16 at 21:26:11 by Chris Johns
This error is the expected result of the test. It does not pass. See #2767 for the original issue that raised the problem.
comment:9 Changed on 11/23/16 at 06:04:02 by Sebastian Huber
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:10 Changed on 05/11/17 at 07:31:02 by Sebastian Huber
Milestone: | 4.12 → 4.12.0 |
---|
comment:11 Changed on 11/09/17 at 06:27:14 by Sebastian Huber
Milestone: | 4.12.0 → 5.1 |
---|
Milestone renamed
This is due to the following relocation record:
The type is R_SPARC_32 is declared as being aligned however the offset is 0x13 and this causes a misaligned access.