Advertisement
Guest User

Untitled

a guest
May 7th, 2025
48
0
130 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.74 KB | Source Code | 0 0
  1. # Resolve $LIB linker search path token to the correct directory
  2. # for a multilib system that uses "lib/" for 64-bit,
  3. # and "lib32/" for 32-bit.
  4.  
  5. diff -Nurp binutils-2.43.1.orig/ld/ld.1 binutils-2.43.1/ld/ld.1
  6. --- binutils-2.43.1.orig/ld/ld.1    2024-08-17 00:00:00.000000000 +0100
  7. +++ binutils-2.43.1/ld/ld.1 2025-05-05 19:37:48.011230960 +0100
  8. @@ -2260,7 +2260,7 @@ colons, or by appearing multiple times.
  9.  The tokens \fR\f(CI$ORIGIN\fR\fI\fR and \fI\fR\f(CI$LIB\fR\fI\fR can appear in these search
  10.  directories.  They will be replaced by the full path to the directory
  11.  containing the program or shared object in the case of \fI\fR\f(CI$ORIGIN\fR\fI\fR
  12. -and either \fBlib\fR \- for 32\-bit binaries \- or \fBlib64\fR \- for
  13. +and either \fBlib32\fR \- for 32\-bit binaries \- or \fBlib\fR \- for
  14.  64\-bit binaries \- in the case of \fI\fR\f(CI$LIB\fR\fI\fR.
  15.  .Sp
  16.  The alternative form of these tokens \- \fI${ORIGIN}\fR and
  17. diff -Nurp binutils-2.43.1.orig/ld/ldelf.c binutils-2.43.1/ld/ldelf.c
  18. --- binutils-2.43.1.orig/ld/ldelf.c 2024-08-17 00:00:00.000000000 +0100
  19. +++ binutils-2.43.1/ld/ldelf.c  2025-05-05 12:04:35.119011596 +0100
  20. @@ -543,13 +543,13 @@ ldelf_search_needed (const char *path, s
  21.         case 'L':
  22.           if (strcmp (v, "IB") == 0 || strcmp (v, "IB}") == 0)
  23.         {
  24. -         /* LIB - replace with "lib" in 32-bit environments
  25. -            and "lib64" in 64-bit environments.  */
  26. +         /* LIB - replace with "lib32" in 32-bit environments
  27. +            and "lib" in 64-bit environments.  */
  28.  
  29.           switch (elfsize)
  30.             {
  31. -           case 32: replacement = "lib"; break;
  32. -           case 64: replacement = "lib64"; break;
  33. +           case 32: replacement = "lib32"; break;
  34. +           case 64: replacement = "lib"; break;
  35.             default:
  36.               abort ();
  37.             }
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement