NO

Author Topic: /T  (Read 4290 times)

Grincheux

  • Guest
/T
« on: March 18, 2015, 06:26:23 PM »
Code: [Select]
/T? gives the following

 /Tx86-coff ----> Linux32 ?
 /Tx86-asm ----> Win32 ?
 /Tx64-coff ----> ?
 /Tx64-asm -----> ?
 /Tamd64-coff -----> Linux64 ?
 /Tamd64-asm -----> Win64 ?

Need help to understand these definitions.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: /T
« Reply #1 on: March 18, 2015, 07:12:36 PM »
From help:
Format Description
/Tx86-coff Creates a COFF (Common Object File Format) object file for a X86 processor.
/Tx86-asm Creates an assembly text file for a X86 processor.
/Tamd64-coff Creates a COFF (Common Object File Format) object file for a X64 processor.
/Tamd64-asm Creates an assembly text file for a X64 processor.
May the source be with you

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: /T
« Reply #2 on: March 18, 2015, 07:16:47 PM »
MS PE (portable executable) format is based on COFF. So /Tx68-coff means PE32 format, /Tamd64-coff means PE64. The asm means that will be output an assembler file instead of an object.
amd64, and not x64, because the actual 64bits architecture was developed by AMD, then adopted by INTEL. The 64 bits approach of INTEL passed through the ALPHA processor (patent acquired by INTEL from DEC  (Digital Computer Corporation)) then to ITANIUM INTEL processor, that have a completely different HW architecture.
The genial semplification invented by AMD to extend to 64bits the standard x86 architecture become a de-facto standard in very short time (basically because both instruction sets could be used in a mixed form allowing 64bits use in preexistent codes and systems with small modifications) forcing INTEL to buy rights to adopt the standard for its processors.
The ITANIUM is used on big machines and servers, but had not so much fortune on PC because all existend binary code could not be used.

Last note about the PE (alias MS-COFF) it is not compliant with the standard COFF format because of the different interpretation of bytes offset in the code (so a pure COFF object file could be linked with MS-COFF objects, but the pointers will be wrong and, obviously, the proggram will crash  ::) )
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Grincheux

  • Guest
Re: /T
« Reply #3 on: March 18, 2015, 08:02:43 PM »
Thank you for the answers. I read the help file but nothing.
With "/Tamd64-asm" it is for having the assembler code generated by the compiler. A kind of "/Fl" on MS compilers?

Another question is /OPT:REF needed?
Where can I enter this option, actually I  have modified the project file, but it is wrong.

Are there options typicalling for DLL, DRIVERS and normal EXE files?

Which options could I use to minimize the executable and to make optimizations. Differents than /Ox...

Pelle's C compiler has a "/cbstring" option. Is it possible to use it without writing a device driver?

What is /hotpatch ? My english is so bad that I can't understand what is said about.

The last, "/Ws". I don't understand this linker option. Could you explain it to me?

Grincheux

  • Guest
Re: /T
« Reply #4 on: January 19, 2020, 06:30:12 AM »
I tried this command line:
Quote
CCFLAGS = -std:C17 -Tx64-coff /Tx64-asm -arch:SSE2 -Ot -Ox -Ob1 -fp:precise -W2 -Ze -Zx -J#
And I never get an assembler listing but this error:
Quote
POLINK: fatal error: Invalid machine type in object 'C:\Users\Philippe\Documents\Pelles C Projects\E++\Compile\Columns.obj'.
Whait is wrong?

If I remove
Quote
/Tx64-asm
no problem when linking. I suppose that it is not possible to have these two options together?
It is normal because when using /Tx64-asm the asm code is in the ".obj" file. The assembler code listed is not very useful, just a pseudo assembler code, the line number is not on the same line. Can't see how many bytes required for the stack, except when leaving. In the next release that would be an excellent idea to improve that and to have a ".lst" for the assembler code and the possiblity that the two options can be used together. Please?
« Last Edit: January 19, 2020, 06:46:44 AM by Grincheux »

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: /T
« Reply #5 on: January 26, 2020, 06:55:54 PM »
I can safely say there will never be a separate .lst file. Too much work for too little gain. Sorry.
/Pelle