/[tinycc]/tinycc/tcc.c
ViewVC logotype

Diff of /tinycc/tcc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.144 by bellard, Sat Oct 4 13:04:47 2003 UTC revision 1.145 by bellard, Sat Oct 4 14:41:18 2003 UTC
# Line 175  typedef struct Section { Line 175  typedef struct Section {
175      struct Section *reloc;   /* corresponding section for relocation, if any */      struct Section *reloc;   /* corresponding section for relocation, if any */
176      struct Section *hash;     /* hash table for symbols */      struct Section *hash;     /* hash table for symbols */
177      struct Section *next;      struct Section *next;
178      char name[64];           /* section name */      char name[1];           /* section name */
179  } Section;  } Section;
180    
181  typedef struct DLLReference {  typedef struct DLLReference {
# Line 964  Section *new_section(TCCState *s1, const Line 964  Section *new_section(TCCState *s1, const
964  {  {
965      Section *sec;      Section *sec;
966    
967      sec = tcc_mallocz(sizeof(Section));      sec = tcc_mallocz(sizeof(Section) + strlen(name));
968      pstrcpy(sec->name, sizeof(sec->name), name);      strcpy(sec->name, name);
969      sec->sh_type = sh_type;      sec->sh_type = sh_type;
970      sec->sh_flags = sh_flags;      sec->sh_flags = sh_flags;
971      switch(sh_type) {      switch(sh_type) {

Legend:
Removed from v.1.144  
changed lines
  Added in v.1.145

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26