From patchwork Sun Jun 7 14:30:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 3977 Return-Path: Received: from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D7B7F600F7 for ; Sun, 7 Jun 2020 16:30:18 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=uajain.com header.i=@uajain.com header.b="GV1s6TDE"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type; s=s1; bh=wMLC9j8rhluqstRzlLLkjEoCQn2DRbukHnQVkMYqBag=; b=GV1s6TDEmE6fkTSoON+kye+YMCFPCCNLgfUsKKWauODdByHdasK7zo7WJC6K1HhYN4no XzHECXz1fPnGBrirWAKjMOH8WJUGbSjb9Rjicwjo/uyAEvqgaf6BRUh+wtgn7ZpMykfdc0 ug6rj/Z4Wle5ZjlyGyphnMDaqD4xyIR44= Received: by filterdrecv-p3mdw1-6f5df8956d-25bh4 with SMTP id filterdrecv-p3mdw1-6f5df8956d-25bh4-19-5EDCF9F9-4C 2020-06-07 14:30:17.360173086 +0000 UTC m=+324984.958445081 Received: from mail.uajain.com (unknown) by ismtpd0002p1hnd1.sendgrid.net (SG) with ESMTP id _9EPxQMDQuqjFtzA_14i0g Sun, 07 Jun 2020 14:30:16.915 +0000 (UTC) From: Umang Jain Date: Sun, 07 Jun 2020 14:30:17 +0000 (UTC) Message-Id: <20200607143012.17752-1-email@uajain.com> Mime-Version: 1.0 X-SG-EID: 1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPc9vLW9W8H4bP+KZ0PPVtun2rxOrGqyhkn1bQ3uE3O9a4klHh7oCiiYhfiN28Mj9Uew9H2EvC1bYAALSeRZQMqdiZD+i5ICyksGJuQ/D1Xmi0LkEtpuV5xCQYDaRn54xDHkAgUM+4Y9E+F5Iuk32zmVHFFUY2D/eQ+KxzQwVMqrqTQClm0tjnM7ZOq5Z3TTbdPUgPCGramcPK4+vD+58nMUw== To: laurent.pinchart@ideasonboard.com, libcamera-devel@lists.libcamera.org, kieran.bingham@ideasonboard.com Subject: [libcamera-devel] [PATCH v3 0/2] Fix implicit sign extension X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2020 14:30:19 -0000 Changelog: v2-> v3 - Adopt to Laurent's suggestion to specify idx arg as ElfW(Half) (instead of `unsigned int` in v2) in the refactoring commit 1/2. This way it's cleaner and explicitly casting in 2/2 makes our bets on the safer side regarding various platform specificity. v1->v2: - Introduce a refactoring commit to share code dealing with same computation of finding section header based on Laurent's review. - Apply the v1 changes on top of refactored code and update commit message. Umang Jain (2): libcamera: ipa_module: Share code to find section header of ELF header libcamera: ipa_module: Fix implicit sign-extension in elfSection src/libcamera/ipa_module.cpp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-)