aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Tamm2002-12-01 06:33:53 +0000
committerSteven Tamm2002-12-01 06:33:53 +0000
commit40e6ff959e664a83d3e6fa3f8cfdb66786a9d258 (patch)
tree8f17db9b4098372a2832637d41f07ef7bbb6780a /src
parentb6f85fd7e08a0c30206fa4bbd1e1405b82c1ff6e (diff)
downloademacs-40e6ff959e664a83d3e6fa3f8cfdb66786a9d258.tar.gz
emacs-40e6ff959e664a83d3e6fa3f8cfdb66786a9d258.zip
unexmacosx.c: Now corrects the offset in two hints table to allow prebinding
to be redone and allow the executable to be stripped.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/unexmacosx.c22
2 files changed, 28 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f48bed6deb2..3275ca3759d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12002-12-01 Steven Tamm <steventamm@mac.com>
2
3 * unexmacosx.c (copy_twolevelhints, dump_it): Now corrects the
4 offset in two hints table to allow prebinding to be redone and
5 allow the executable to be stripped.
6
12002-11-29 Dave Love <fx@gnu.org> 72002-11-29 Dave Love <fx@gnu.org>
2 8
3 * fns.c (Frequire): Don't call LOADHIST_ATTACH if feature was 9 * fns.c (Frequire): Don't call LOADHIST_ATTACH if feature was
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index d9c91e5abb0..03aafd2912a 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -753,6 +753,25 @@ copy_dysymtab (struct load_command *lc)
753 curr_header_offset += lc->cmdsize; 753 curr_header_offset += lc->cmdsize;
754} 754}
755 755
756/* Copy a LC_TWOLEVEL_HINTS load command from the input file to the output
757 file, adjusting the file offset fields. */
758static void
759copy_twolevelhints (struct load_command *lc)
760{
761 struct twolevel_hints_command *tlhp = (struct twolevel_hints_command *) lc;
762
763 if (tlhp->nhints > 0) {
764 tlhp->offset += delta;
765 }
766
767 printf ("Writing LC_TWOLEVEL_HINTS command\n");
768
769 if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
770 unexec_error ("cannot write two level hint command to header");
771
772 curr_header_offset += lc->cmdsize;
773}
774
756/* Copy other kinds of load commands from the input file to the output 775/* Copy other kinds of load commands from the input file to the output
757 file, ones that do not require adjustments of file offsets. */ 776 file, ones that do not require adjustments of file offsets. */
758static void 777static void
@@ -799,6 +818,9 @@ dump_it ()
799 case LC_DYSYMTAB: 818 case LC_DYSYMTAB:
800 copy_dysymtab (lca[i]); 819 copy_dysymtab (lca[i]);
801 break; 820 break;
821 case LC_TWOLEVEL_HINTS:
822 copy_twolevelhints (lca[i]);
823 break;
802 default: 824 default:
803 copy_other (lca[i]); 825 copy_other (lca[i]);
804 break; 826 break;