[Bug 256899] ELF image activator does not like thumb entry points

[email protected]
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256899

            Bug ID: 256899
           Summary: ELF image activator does not like thumb entry points
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: arm
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: [email protected]
          Reporter: [email protected]

An ARM ELF binary with an odd entry point should start the binary in Thumb
mode.  However, this does not seem to be the case, forcing the entry point to
be in ARM mode.  To reproduce, copy the following code to a file named test.s:

        .arch armv7a
        .syntax unified
        .thumb
        .thumb_func
        .globl _start
_start: movs r0, #0
        movs r7, #1
        svc #0

Then assemble and link:

    as -o test.o test.s
    ld -o test test.o

And observe the program crashing on start with a segmentation fault or invalid
instruction exception.  Expected behaviour is that the program terminates with
exit status 0.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.