Giter VIP home page Giter VIP logo

Comments (3)

edelsohn avatar edelsohn commented on June 19, 2024 2

Note that GNU as on AIX is AIX XCOFF syntax. GNU as on AIX does not accept ELF-like syntax as input and translate it to XCOFF format on output.

AIX now supports DWARF debugging. The internals of the DWARF sections are standard DWARF. The names of the sections and DWARF section headers are slightly different. AIX assembler mostly accepts GCC-generated DWARF unchanged.

The rhythm for AIX assembler is a little different, especially the syntax introducing a function. There are pseudo-ops with identical purpose but different name.

The main difference is addressing. AIX XCOFF and Linux ELF are very similar in the concept of position independent addressing, but ELF was designed to delegate the creation of the address table to the linker (Global Offset Table aka GOT), while XCOFF was designed for the compiler to create and manage the address table (Table of Contents aka TOC). It's the same purpose and similar behavior, but requires a little more verbiage in the assembler files.

AIX only supports the traditional COFF sections (text, data, bss) and a few others. For finer granularity, it uses a concept called CSECT

    .csect .my_named_text_section[PR]

    .csect .my_named_data_section[RW]

The "[PR]" and "[RW]" are what XCOFF calls mapping classes. This is a decoration after the CSECT name that instructs the linker how to map the CSECTs to COFF sections. PR for PRogram maps to text. RW for Read/Write maps to data. RO for Read Only maps to text.

One needs a code address (with the dot) and function descriptor (without the dot) for functions.

GCC assembly language output for AIX is a good example to follow.

from binarydist.

NattyNarwhal avatar NattyNarwhal commented on June 19, 2024

Initial experimentation

Looks like we need to figure out what's with section headers - does AIX not support subsections? This should be fine on ELF systems, but of course, AIX ain't ELF.

Some other stuff like that might need tweaking...

from binarydist.

NattyNarwhal avatar NattyNarwhal commented on June 19, 2024

It turns out the answer for GNU vs. IBM as is "don't even bother with GNU as on AIX" in gentler terms. This will require a lot of refactoring....

from binarydist.

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.