Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
047e698c
Commit
047e698c
authored
Apr 20, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ld: remove MachoLoad limit
Fixes #1571. R=ken2 CC=golang-dev
https://golang.org/cl/4443052
parent
e1ee3b5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
src/cmd/ld/macho.c
src/cmd/ld/macho.c
+13
-6
No files found.
src/cmd/ld/macho.c
View file @
047e698c
...
...
@@ -12,10 +12,10 @@
static
int
macho64
;
static
MachoHdr
hdr
;
static
MachoLoad
load
[
16
]
;
static
MachoLoad
*
load
;
static
MachoSeg
seg
[
16
];
static
MachoDebug
xdebug
[
16
];
static
int
nload
,
nseg
,
ndebug
,
nsect
;
static
int
nload
,
mload
,
nseg
,
ndebug
,
nsect
;
void
machoinit
(
void
)
...
...
@@ -43,10 +43,17 @@ newMachoLoad(uint32 type, uint32 ndata)
{
MachoLoad
*
l
;
if
(
nload
>=
nelem
(
load
))
{
diag
(
"too many loads"
);
if
(
nload
>=
mload
)
{
if
(
mload
==
0
)
mload
=
1
;
else
mload
*=
2
;
load
=
realloc
(
load
,
mload
*
sizeof
load
[
0
]);
if
(
load
==
nil
)
{
diag
(
"out of memory"
);
errorexit
();
}
}
if
(
macho64
&&
(
ndata
&
1
))
ndata
++
;
...
...
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