Opened 2 years ago

Closed 23 months ago

Last modified 22 months ago

#14 closed defect (fixed)

Allow programs to override libc symbols

Reported by: Vladimír Štill Owned by: mornfall
Priority: major Milestone: 5.0
Component: DiOS Keywords:


int write() { return 42; }
int main() { return write(); }

This code can be normally compiled by gcc. But it does not load in DIVINE:

error: Linking globals named 'write': symbol multiply defined!

Change History (4)

comment:1 Changed 2 years ago by mornfall

Component: benchdivcc
Owner: changed from mornfall to blurrymoi
Status: newassigned
Summary: Fix linking programs that define symbols with names of libc functionAllow programs to override libc symbols

comment:2 Changed 23 months ago by mornfall

Component: divccDiOS
Owner: changed from blurrymoi to mornfall
Status: assignedaccepted

The way this is normally implemented is that things like 'write' (which are part of POSIX, but not part of ISO C) are weak aliases to internal symbols (like _libc_write).

comment:3 Changed 23 months ago by blurrymoi

Resolution: fixed
Status: acceptedclosed

comment:4 Changed 22 months ago by mornfall

Milestone: future5.0

Milestone renamed

Note: See TracTickets for help on using tickets.