Opened 8 years ago

Closed 8 years ago

#7443 closed bug (invalid)

Strange crash when doing PIC in ASM

Reported by: js Owned by: nobody
Priority: normal Milestone: R1
Component: System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: x86

Description

When doing PIC in ASM, I get a crash in a line like this:
add eax, some_method_in_the_same_unit-.L2

The full code is here:
https://webkeks.org/hg/objfw-rt/file/ab3805ce47fd/src/lookup-i386-elf.S#l53
(The crash is in line 53)

The exakt same code runs just fine on Linux (even valgrind does not have anything to complain about) - it only crashes on Haiku. Am I doing something wrong, is PIC done differently on Haiku or is this a bug? And how can this line crash? There isn't even any memory access!

Change History (2)

comment:1 by js, 8 years ago

It works when using offset some_method_in_the_same_unit - offset .L2, so it seems that different versions of GAS are behaving differently. Can someone close the bug?

comment:2 by bonefish, 8 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.