The default bug view has changed. See this FAQ.

I know how to strip a binary's symbol table of all non-global symbols except for text symbols. I also know how to strip LC_CODE_SIGNATURE load commands once they've been added.

RESOLVED FIXED in Camino1.6

Status

Camino Graveyard
General
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Mark Mentovai, Assigned: Mark Mentovai)

Tracking

({fixed1.8.1.12})

Details

Attachments

(2 attachments)

973.21 KB, patch
Smokey Ardisson (offline for a while; not following bugs - do not email)
: review+
Details | Diff | Splinter Review
14.17 KB, patch
Stuart Morgan
: review+
Details | Diff | Splinter Review
(Assignee)

Description

9 years ago
This should take care of bug 407779.  I also alluded to it in bug 409849 comment 4.
(Assignee)

Comment 1

9 years ago
Created attachment 296565 [details] [diff] [review]
Add striptease to mozilla/camino
(Assignee)

Comment 2

9 years ago
Created attachment 296566 [details] [diff] [review]
diff between strip.c and tease.c

The only interesting bits in attachment 296565 [details] [diff] [review] are at the top, the changes to:

mozilla/camino/Makefile.in
mozilla/camino/striptease/Makefile.in
mozilla/camino/striptease/README

Everything else in that patch comes straight out of Apple's cctools-667.3 package (see the README), except for tease.c.  tease.c is a modified version of cctools' strip.c.  This diff contains the differences between strip.c and tease.c.
(Assignee)

Comment 3

9 years ago
tease can also be used to remove code signatures from binaries, as discussed in bug 409459 comment 5.
(Assignee)

Updated

9 years ago
No longer blocks: 407779
(Assignee)

Updated

9 years ago
Blocks: 407779
(Assignee)

Comment 4

9 years ago
We need to know whether it's cool to land APSL stuff in the tree.  It's for a build-time tool only, none of the stuff here would be distributed.
(Assignee)

Comment 5

9 years ago
Comment on attachment 296566 [details] [diff] [review]
diff between strip.c and tease.c

I should probably also document "tease -a" in the README.
This needs to block 1.6, and probably b2 if not b1.  Sam was supposed to be checking about APSL code.
Flags: camino1.6b2?
Flags: camino1.6b1?
Flags: camino1.6+
Target Milestone: --- → Camino1.6
(Assignee)

Comment 7

9 years ago
Comment on attachment 296566 [details] [diff] [review]
diff between strip.c and tease.c

I don't really know who else to send this review to.  :(
Attachment #296566 - Flags: review?(stuart.morgan)
(Assignee)

Comment 8

9 years ago
Comment on attachment 296565 [details] [diff] [review]
Add striptease to mozilla/camino

Smokey, just the Makefile and the README, please.
Attachment #296565 - Flags: review?(alqahira)
Flags: camino1.6b1? → camino1.6b1-
Comment on attachment 296565 [details] [diff] [review]
Add striptease to mozilla/camino

Looks good (though I'm not fond of all the warnings it generates during compilation).  Please do document -a as you mentioned in comment 5; r=ardissone with that.
Attachment #296565 - Flags: review?(alqahira) → review+

Comment 10

9 years ago
Comment on attachment 296566 [details] [diff] [review]
diff between strip.c and tease.c

>+ * No -x (strip all local), and either -S (strip
>+ * debug), -X (strip 'L' local), or -t (strip
>+ * local except non-'L' text) was given.

s/either/one of/

>+	if(cflag){
>+	    /*
>+	     * To get the right amount of the file copied out by writeout() for
[...]

I didn't follow how adding this if(cflag) wrapper was related to your change.

To the extent that I understood this patch though, it looks fine, so r=me
Attachment #296566 - Flags: review?(stuart.morgan) → review+
(Assignee)

Comment 11

9 years ago
The if(cflag) thing was added to a chunk of code that previously only executed if cflag was set - the strip_LC_CODE_SIGNATURE_commands function.  The diff between strip and tease changes that function to execute if either cflag or no_code_signature is set.  Only some of that function actually makes sense to use for the no_code_signature case.  The rest is really specific to the combination of -c and code signature stripping.  I had to keep that section cflag-only, so that it wouldn't ruin the Mach-O output if the user wanted to perform the simpler task of stripping the LC_CODE_SIGNATURE load command only without generating a stub executable.
(Assignee)

Comment 12

9 years ago
Smokey, the warnings suck, but they're Apple's warnings.  I wanted to keep this a minimal-change thing (at least for the initial landing).  Boo to Apple for naming one of their "libstuff" functions "round", the name of a libc (or libm or libmx) function usually provided by a gcc built-in.
(Assignee)

Updated

9 years ago
Blocks: 413527
(Assignee)

Comment 13

9 years ago
Checked in on the trunk and MOZILLA_1_8_BRANCH for 1.6b3.

This adds and builds striptease, we'll start using it in bug 413527 to fix bug 407779.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Keywords: fixed1.8.1.12
Resolution: --- → FIXED
Flags: camino1.6b3? → camino1.6b3+
(Assignee)

Updated

9 years ago
Blocks: 414397
You need to log in before you can comment on or make changes to this bug.