History

Avoid crash with "Avoid a crash with weak symbols for "make test""

This fixes commit 197a6acb30940068d1dc3d0fa53c9f0863309885 which fixed commit 95b9a477b6743004e0e9bf728b25bf63d2908777 Also remove useless example files

grischka committed 16 years ago

Commit 82c5edb1 parent 5e6fabe3 files · +1 −18Browse files

Unified · Split

3 files
  1. examples/ex_weak.c +0 −11
  2. examples/weak_f.c +0 −6
  3. libtcc.c +1 −1
examples/ex_weak.c+0−11
@@ -1,11 +0,0 @@
1#! /usr/local/bin/tcc -run
2#include <tcclib.h>
3
4extern void weak_f (void) __attribute__ ((weak));
5
6int main ()
7{
8 if (weak_f) {
9 weak_f();
10 }
11}
examples/weak_f.c+0−6
@@ -1,6 +0,0 @@
1#include <tcclib.h>
2
3void weak_f (void)
4{
5 printf("Weak\n");
6}
libtcc.c+1−1
@@ -429,7 +429,7 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section, · 428 unmodified lines
429 if (sym->type.t & VT_STATIC)429 if (sym->type.t & VT_STATIC)
430 sym_bind = STB_LOCAL;430 sym_bind = STB_LOCAL;
431 else {431 else {
432 if (sym->type.ref && FUNC_WEAK(sym->type.ref->r))432 if (sym_type == STT_FUNC && sym->type.ref && FUNC_WEAK(sym->type.ref->r))
433 sym_bind = STB_WEAK;433 sym_bind = STB_WEAK;
434 else434 else
435 sym_bind = STB_GLOBAL;435 sym_bind = STB_GLOBAL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t