ALT Linux Bugzilla
– Attachment 1775 Details for
Bug 10768
invalid code generated (affects modutils-2.4.27-alt8)
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
obj_reloc.c - example code
obj_reloc.c (text/plain), 668 bytes, created by
Sergey Vlasov
on 2007-02-04 19:36:27 MSK
(
hide
)
Description:
obj_reloc.c - example code
Filename:
MIME Type:
Creator:
Sergey Vlasov
Created:
2007-02-04 19:36:27 MSK
Size:
668 bytes
patch
obsolete
>#include <stddef.h> >#include <alloca.h> > >struct obj_symbol >{ > struct obj_symbol *next; > unsigned int size; >}; > >struct common_entry >{ > struct common_entry *next; > struct obj_symbol *sym; >}; > >extern void do_something(struct obj_symbol *sym); > >void obj_allocate_commons(struct obj_symbol *sym) >{ > struct common_entry *common_head = NULL; > > for (; sym ; sym = sym->next) { > struct common_entry **p, *n; > for (p = &common_head; *p ; p = &(*p)->next) > if (sym->size <= (*p)->sym->size) > break; > > n = alloca(sizeof(*n)); > n->next = *p; > n->sym = sym; > *p = n; > } > > { > struct common_entry *p; > for (p = common_head; p ; p = p->next) > do_something(p->sym); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 10768
: 1775 |
1776
|
1777
|
1779