Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Never make anything simple and efficient when a way can be found to make it complex and wonderful.


programming / alt.lang.asm / CMake assembler errors: unrecognized opcode:func_export / unsupported relocation against r3

SubjectAuthor
o CMake assembler errors: unrecognized opcode:func_export / unsupportedmike000149

1
Subject: CMake assembler errors: unrecognized opcode:func_export / unsupported relocation against r3
From: mike000...@gmail.com
Newsgroups: alt.lang.asm
Date: Fri, 28 Feb 2020 14:08 UTC
X-Received: by 2002:a05:620a:13a9:: with SMTP id m9mr4703923qki.359.1582898931651;
Fri, 28 Feb 2020 06:08:51 -0800 (PST)
X-Received: by 2002:a25:8811:: with SMTP id c17mr3942661ybl.271.1582898931498;
Fri, 28 Feb 2020 06:08:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Fri, 28 Feb 2020 06:08:51 -0800 (PST)
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=130.76.112.28; posting-account=bmEKUQoAAABmS1QwtJqpOgyyK6CJfRg-
NNTP-Posting-Host: 130.76.112.28
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <98767f97-0273-4f33-80c8-8af2d0e07a9a@googlegroups.com>
Subject: CMake assembler errors: unrecognized opcode:func_export / unsupported
relocation against r3
From: mike000...@gmail.com
Injection-Date: Fri, 28 Feb 2020 14:08:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
(1) I’m getting CMake assembler errors such as:

    testing.s:137: Error: unrecognized opcode: ‘func_export(testing)’
    testing.s:146: Error: unrecognized opcode: ‘func_begin(testing)’
    testing.s:217: Error: unrecognized opcode: ‘func_end(testing)’
    testing.s:149: Error: unsupported relocation against r3
    testing.s:162: Error: unsupported relocation against r4
    testing.s:187: Error: unsupported relocation against r5

(2) Question: What can I do about these errors?

My assembly code (in file testing.s) looks something like the following code. I’ve removed a lot of it and am trying to be concise.

    #define _ASMLANGUAGE
    #include “vxWorks.h”
    #include <asm.h>

    FUNC_EXPORT(testing)
    .text
    .align 2
    .long 0
    .long 1
    .globl testing
    FUNC_BEGIN(testing)
    li r3, 1
    ori r4, r4, 0x6789
    srw r4, r4, r5
    FUNC_END(testing)

(3) My CMakeLists.txt looks something like:

    cmake_minimum_required (VERSION 2.6)
    project(testing LANGUAGES CXX ASM)
    set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -Wall -g -std=c++0x -Wextra -Wpedantic”)
    set(dir3 …/…/…/util/dir3)
    add_executable(testing
    ${dir3}/one.cpp
    ${dir3}/testing.s
    )

(4) File one.cpp looks something such as:

    extern “C” int testing(void);
    //…
    testing();
    //…

Thank you,


1
rocksolid light 0.7.2
clearneti2ptor