ALT Linux Bugzilla
– Attachment 5527 Details for
Bug 27603
Стрипается чанк "Attr"
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч
0001-beam_lib-don-t-strip-Attr-chunk.patch (text/plain), 1.80 KB, created by
Serge Polkovnikov
on 2012-08-02 20:53:13 MSK
(
hide
)
Description:
Патч
Filename:
MIME Type:
Creator:
Serge Polkovnikov
Created:
2012-08-02 20:53:13 MSK
Size:
1.80 KB
patch
obsolete
>From 15b2c685b86b4952f200a91273c292145dac9baa Mon Sep 17 00:00:00 2001 >From: Led <led@massivesolutions.co.uk> >Date: Wed, 25 Apr 2012 16:42:07 +0300 >Subject: [PATCH] beam_lib: don't strip "Attr" chunk > >--- > lib/stdlib/src/beam_lib.erl | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/lib/stdlib/src/beam_lib.erl b/lib/stdlib/src/beam_lib.erl >index fdfbb2e..549b9ba 100644 >--- a/lib/stdlib/src/beam_lib.erl >+++ b/lib/stdlib/src/beam_lib.erl >@@ -395,7 +395,7 @@ strip_fils(Files) -> > > %% -> {ok, {Mod, FileName}} | {ok, {Mod, binary()}} | throw(Error) > strip_file(File) -> >- {ok, {Mod, Chunks}} = read_significant_chunks(File), >+ {ok, {Mod, Chunks}} = read_unstripped_chunks(File), > {ok, Stripped0} = build_module(Chunks), > Stripped = compress(Stripped0), > case File of >@@ -452,6 +452,14 @@ read_all_but_useless_chunks(File0) when is_atom(File0); > is_useless_chunk("CInf") -> true; > is_useless_chunk(_) -> false. > >+read_unstripped_chunks(File) -> >+ case read_chunk_data(File, unstripped_chunks(), [allow_missing_chunks]) of >+ {ok, {Module, Chunks0}} -> >+ Mandatory = mandatory_chunks(), >+ Chunks = filter_significant_chunks(Chunks0, Mandatory, File, Module), >+ {ok, {Module, Chunks}} >+ end. >+ > %% -> {ok, {Module, Chunks}} | throw(Error) > read_significant_chunks(File) -> > case read_chunk_data(File, significant_chunks(), [allow_missing_chunks]) of >@@ -836,6 +844,9 @@ error(Reason) -> > throw({error, ?MODULE, Reason}). > > >+unstripped_chunks() -> >+ significant_chunks() ++ ["Attr"]. >+ > %% The following chunks are significant when calculating the MD5 for a module, > %% and also the modules that must be retained when stripping a file. > %% They are listed in the order that they should be MD5:ed. >-- >1.7.11.4 >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 27603
: 5527