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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned 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 File(s):
   
   
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 click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup1