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

Submitter:  None
Submitted:  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
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

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

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

 

 

 

No changes have been made to this item

Back to the top


Powered by Savane 3.9