Code Monkey home page Code Monkey logo

Comments (5)

galak avatar galak commented on May 28, 2024

I tried this test on fedora and get:

[galak@spiff zephyr]$ objdump -d test.o

test.o:     file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <.text>:
   0:	b8 00 00 00 00       	mov    $0x0,%eax

from sdk-ng.

 avatar commented on May 28, 2024

@galak Sorry, there was a formatting error in the description, which left off the X=(512/4) bit (which is crucial).

from sdk-ng.

galak avatar galak commented on May 28, 2024

@gnuless the 2.32 you built from source, what config options did you give it?

from sdk-ng.

 avatar commented on May 28, 2024

the 2.32 you built from source, what config options did you give it?

Oh, just very vanilla. ./configure --prefix=/home/charles/binutils-test or similar. On an Ubuntu 18.04.3 x86_64 system, then make install and test.

from sdk-ng.

dcpleung avatar dcpleung commented on May 28, 2024

Seems like binutils treats slashes as start of a comment on i386, from: https://sourceware.org/binutils/docs-2.33.1/as/i386_002dChars.html#i386_002dChars

If the --divide command-line option has not been specified then the ‘/’ character appearing anywhere on a line also introduces a line comment.

Adding --divide to x86_64-zephyr-elf-as fixes the error. Running objdump with the resulting object file shows the same output.

This is due to the #define SVR4_COMMENT_CHARS and i386_comment_chars variable in gas/config/tc-i386.c (line 440). According to the #if, forward slash is considered the beginning of a comment when the target is not a Linux base system (among others). Therefore, locally compiled version, as it is targeting a Linux system, would not consider forward slash as the start of a comment. So this is intended behavior of binutils.

from sdk-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.