Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

.S help

New Contributor II

Iwrote pure.S asm code file for C++ file, which means that a.s has .S pattern of .bss, .data, .text and .globl sections followed by .globl function definitions using instructions. Here is the original file whose .S file is a.s.

To confirm the error if any within a.s file I tried checking this.S file using "as -o a.o a.s" which doesn't generate any errors. I am using ICC-v11.0 on Linux x86_64 with GNU-syntax for .S file.

I have to incorporate thisa.s file alongwith other multiple c/c++ files as a single package.

But I have a question, this original C/C++ file( which has API been defined inside this a.ccare calledby someother cpp files (could be by,, etc.) for example if the file and ir's API is defined as below -
#include "a.h"

Apple ( const State now,
const Real vt[MAX_TORS][SPACE],
const int tlist[MAX_TORS][MAX_ATOMS],
const int ntor );

So, this API (apple of would be called as "Apple (now, crd, vt, tlist, ntor)" in some places of other C/C++ files. So, my query is - How do one take care of this prototype function calls when compiling and linking with a.s file which is pure .S asm file of file. (The reason of asking this query is - To take care Compiler and assembler mis-match if any, though ICC-v11.0 has GAS as a assembler,and I think ICC-v11.0 would inernally call "as" asembler.) Does below syntax in a.s would take care -

.section .text
.type Apple, @function
.globl Apple

Algorithm instuctions of

Also, since this package has multiple c/c++ files, the Makefile which has been initially written for multiple .cc files having initially and called together to generate single executable, how do I give a command for including this a.s file and create it's object and finally link with other .cc files as a standard practice. Here, I mean writing a Makefile with a mix of many .cc files and .s file.

Looking for anyclue or suggestions or any reference of any Open-source package from which I can take some guidelines for above queries and steps.

0 Kudos
0 Replies