Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
86cfaf66
Commit
86cfaf66
authored
Oct 10, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reallocate library, libraryobj: 50 isn't nearly enough
R=rsc DELTA=7 (2 added, 0 deleted, 5 changed) OCL=35569 CL=35569
parent
6e4f9353
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
lib.c
src/cmd/ld/lib.c
+4
-3
lib.h
src/cmd/ld/lib.h
+3
-2
No files found.
src/cmd/ld/lib.c
View file @
86cfaf66
...
...
@@ -153,9 +153,10 @@ addlib(char *src, char *obj)
for
(
i
=
0
;
i
<
libraryp
;
i
++
)
if
(
strcmp
(
name
,
library
[
i
])
==
0
)
return
;
if
(
libraryp
==
nelem
(
library
)){
diag
(
"too many autolibs; skipping %s"
,
name
);
return
;
if
(
libraryp
==
nlibrary
){
nlibrary
=
50
+
2
*
libraryp
;
library
=
realloc
(
library
,
sizeof
library
[
0
]
*
nlibrary
);
libraryobj
=
realloc
(
libraryobj
,
sizeof
libraryobj
[
0
]
*
nlibrary
);
}
p
=
mal
(
strlen
(
name
)
+
1
);
...
...
src/cmd/ld/lib.h
View file @
86cfaf66
...
...
@@ -36,9 +36,10 @@ extern int cout;
EXTERN
char
*
INITENTRY
;
EXTERN
char
thechar
;
EXTERN
char
*
thestring
;
EXTERN
char
*
library
[
50
]
;
EXTERN
char
*
libraryobj
[
50
]
;
EXTERN
char
*
*
library
;
EXTERN
char
*
*
libraryobj
;
EXTERN
int
libraryp
;
EXTERN
int
nlibrary
;
EXTERN
Sym
*
hash
[
NHASH
];
EXTERN
Sym
*
histfrog
[
MAXHIST
];
EXTERN
uchar
fnuxi8
[
8
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment