bugTiny C Compiler - Bugs: bug #51882, tcc requires function flag to be...

 
 

bug #51882: tcc requires function flag to be set in elf files for standard functions

Submitted by:  None
Submitted on:  Mon 28 Aug 2017 08:20:18 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 28 Aug 2017 08:20:18 PM UTC, original submission:

When you create an elf file with another program and this file uses standard C functions like printf(), tcc does not recognize them as functions until the function flag is set for the symbol.

A more detailed description of the problem can be found in this stackoverflow answer:

"It appears that TCC requires specific type information on functions that are external linkage like printf. By default NASM creates references to symbols with a NOTYPE attribute in the ELF objects. This seems to confuse TCC as it seems to expect external function symbols to be marked with a FUNCTION type."
https://stackoverflow.com/a/45924381/3657155

The SO question is specific for nasm, but the problem should appear with other programs too.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

No changes have been made to this item

Back to the top


Powered by Savane 3.4