Skip to contentSkip to conversation

Remove extra check for ld-linux.so.3 in strcmp

PATCH In review Maninder Singh 3 participants 4 messages Mar 31, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove extra check for ld-linux.so.3 in strcmp

Hi,

From 05ab779af24baef957972aa1d2a9e9d29212cc4c Mon Sep 17 00:00:00 2001
From: Maninder Singh <[email protected]>
Date: Thu, 19 Mar 2015 03:02:59 +0530
Subject: [PATCH 1/1] Remove extra check for ld-linux.so.3 in strcmp
if (! strcmp (soname, "ld-linux.so.2")

      || ! strcmp (soname, "ld-linux.so.3")  ------------------------>
      || ! strcmp (soname, "ld.so.1")
      || ! strcmp (soname, "ld-linux-ia64.so.2")
      || ! strcmp (soname, "ld-linux-x86-64.so.2")
      || ! strcmp (soname, "ld64.so.1")
      || ! strcmp (soname, "ld-linux.so.3") ---------------------------> redundant code
      || ! strcmp (soname, "ld-linux-armhf.so.3"))
Signed-off-by Maninder Singh

---
src/get.c |    1 -

1 files changed, 0 insertions(+), 1 deletions(-)
src/get.c +0 -0
index 6a63f02..a34668a 100644
@@ -35,7 +35,6 @@ is_ldso_soname (const char *soname)
       || ! strcmp (soname, "ld-linux-ia64.so.2")
       || ! strcmp (soname, "ld-linux-x86-64.so.2")
       || ! strcmp (soname, "ld64.so.1")
-      || ! strcmp (soname, "ld-linux.so.3")
       || ! strcmp (soname, "ld-linux-armhf.so.3"))

     return 1;
   return 0;
--
1.7.1

Thanks and Regards,
Maninder Singh

#1 lore raw
Quoted 19 lines · Maninder Singh

Hi,

From 05ab779af24baef957972aa1d2a9e9d29212cc4c Mon Sep 17 00:00:00 2001
From: Maninder Singh <[email protected] <mailto:[email protected]>>
Date: Thu, 19 Mar 2015 03:02:59 +0530
Subject: [PATCH 1/1] Remove extra check for ld-linux.so.3 in strcmp

if (! strcmp (soname, "ld-linux.so.2")

      || ! strcmp (soname, "ld-linux.so.3")  ------------------------>
      || ! strcmp (soname, "ld.so.1")
      || ! strcmp (soname, "ld-linux-ia64.so.2")
      || ! strcmp (soname, "ld-linux-x86-64.so.2")
      || ! strcmp (soname, "ld64.so.1")
      || ! strcmp (soname, "ld-linux.so.3") ---------------------------> redundant code
      || ! strcmp (soname, "ld-linux-armhf.so.3"))
Quoted 1 line
Signed-off-by Maninder Singh

use First Last <your@email>

Quoted 27 lines

---
src/get.c | 1 -

1 files changed, 0 insertions(+), 1 deletions(-)
src/get.c +0 -1
index 6a63f02..a34668a 100644
@@ -35,7 +35,6 @@ is_ldso_soname (const char *soname)
       || ! strcmp (soname, "ld-linux-ia64.so.2")
       || ! strcmp (soname, "ld-linux-x86-64.so.2")
       || ! strcmp (soname, "ld64.so.1")
-      || ! strcmp (soname, "ld-linux.so.3")
       || ! strcmp (soname, "ld-linux-armhf.so.3"))
     return 1;
   return 0;
Signature · 11 lines
1.7.1


Thanks and Regards,
Maninder Singh
<201503310844012_QKNMBDIF.gif>
-- 
_______________________________________________
yocto mailing list
[email protected] <mailto:[email protected]>
https://lists.yoctoproject.org/listinfo/yocto <https://lists.yoctoproject.org/listinfo/yocto>
#2 lore raw

Hmm, I never saw the original email (or thread).

What is the context for this, simply that there are multiple ld-linux.do.3 in the same check and remove one or the other is more efficient?

(I suspect it will be optimized out, but I can make the change quickly enough.)

--Mark

Quoted 57 lines · Khem Raj
Quoted 22 lines

On Mar 30, 2015, at 8:14 PM, Maninder Singh <[email protected] <mailto:[email protected]>> wrote:

Hi,

From 05ab779af24baef957972aa1d2a9e9d29212cc4c Mon Sep 17 00:00:00 2001
From: Maninder Singh <[email protected] <mailto:[email protected]>>
Date: Thu, 19 Mar 2015 03:02:59 +0530
Subject: [PATCH 1/1] Remove extra check for ld-linux.so.3 in strcmp

if (! strcmp (soname, "ld-linux.so.2")

      || ! strcmp (soname, "ld-linux.so.3")  ------------------------>
      || ! strcmp (soname, "ld.so.1")
      || ! strcmp (soname, "ld-linux-ia64.so.2")
      || ! strcmp (soname, "ld-linux-x86-64.so.2")
      || ! strcmp (soname, "ld64.so.1")
      || ! strcmp (soname, "ld-linux.so.3") --------------------------->
redundant code
      || ! strcmp (soname, "ld-linux-armhf.so.3"))
Quoted 2 lines
Signed-off-by Maninder Singh

use First Last <your@email>

Quoted 29 lines

---
src/get.c | 1 -

1 files changed, 0 insertions(+), 1 deletions(-)
src/get.c +0 -1
index 6a63f02..a34668a 100644
@@ -35,7 +35,6 @@ is_ldso_soname (const char *soname)
       || ! strcmp (soname, "ld-linux-ia64.so.2")
       || ! strcmp (soname, "ld-linux-x86-64.so.2")
       || ! strcmp (soname, "ld64.so.1")
-      || ! strcmp (soname, "ld-linux.so.3")
       || ! strcmp (soname, "ld-linux-armhf.so.3"))
     return 1;
   return 0;
Signature · 13 lines
1.7.1


Thanks and Regards,
Maninder Singh

<201503310844012_QKNMBDIF.gif>

-- 
_______________________________________________
yocto mailing list
[email protected] <mailto:[email protected]>
https://lists.yoctoproject.org/listinfo/yocto
#3 lore raw
Quoted 1 line · Mark Hatle

Hmm, I never saw the original email (or thread).

(I have no record of ever receiving the original email. How odd...)

Quoted 4 lines

What is the context for this, simply that there are multiple ld-linux.do.3 in the same check and remove one or the other is more efficient?

(I suspect it will be optimized out, but I can make the change quickly enough.)

I have merged the change, slightly different format.

See:

http://git.yoctoproject.org/cgit/cgit.cgi/prelink-cross/commit/?h=cross_prelink_staging&id=fd99a47124b1f1141f2afe4e87da7cb209cc2927

This is in the staging area.

Maninder if this is ok, I'm more then happy to add your signed-off-by line to the commit before moving it into the cross_prelink branch.

Thanks!
--Mark

Quoted 61 lines

--Mark

Quoted 57 lines · Khem Raj
Quoted 22 lines

On Mar 30, 2015, at 8:14 PM, Maninder Singh <[email protected] <mailto:[email protected]>> wrote:

Hi,

From 05ab779af24baef957972aa1d2a9e9d29212cc4c Mon Sep 17 00:00:00 2001
From: Maninder Singh <[email protected] <mailto:[email protected]>>
Date: Thu, 19 Mar 2015 03:02:59 +0530
Subject: [PATCH 1/1] Remove extra check for ld-linux.so.3 in strcmp

if (! strcmp (soname, "ld-linux.so.2")

      || ! strcmp (soname, "ld-linux.so.3")  ------------------------>
      || ! strcmp (soname, "ld.so.1")
      || ! strcmp (soname, "ld-linux-ia64.so.2")
      || ! strcmp (soname, "ld-linux-x86-64.so.2")
      || ! strcmp (soname, "ld64.so.1")
      || ! strcmp (soname, "ld-linux.so.3") --------------------------->
redundant code
      || ! strcmp (soname, "ld-linux-armhf.so.3"))
Quoted 2 lines
Signed-off-by Maninder Singh

use First Last <your@email>

Quoted 29 lines

---
src/get.c | 1 -

1 files changed, 0 insertions(+), 1 deletions(-)
src/get.c +0 -1
index 6a63f02..a34668a 100644
@@ -35,7 +35,6 @@ is_ldso_soname (const char *soname)
       || ! strcmp (soname, "ld-linux-ia64.so.2")
       || ! strcmp (soname, "ld-linux-x86-64.so.2")
       || ! strcmp (soname, "ld64.so.1")
-      || ! strcmp (soname, "ld-linux.so.3")
       || ! strcmp (soname, "ld-linux-armhf.so.3"))
     return 1;
   return 0;
Signature · 13 lines
1.7.1


Thanks and Regards,
Maninder Singh

<201503310844012_QKNMBDIF.gif>

-- 
_______________________________________________
yocto mailing list
[email protected] <mailto:[email protected]>
https://lists.yoctoproject.org/listinfo/yocto