From patchwork Wed Jan 3 17:14:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 83242 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 24D24385DC1D for ; Wed, 3 Jan 2024 17:17:32 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id 1EFAF38582A4 for ; Wed, 3 Jan 2024 17:15:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1EFAF38582A4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1EFAF38582A4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704302115; cv=none; b=JJ+7kVG0nTpV1NPVfFoGMg/iBjczX8xwMGsYsUqAwiN9mDVOyQyY98Qd2KAihRnnXgAPY679VEzldFFGnUxNX/6sE89AYmzWHrEVOBRK6bX6g6e2EwYUG8mub61q7K0yBAwqURHWfCrK+STIyzKweV2ZZ/DWfekvpaOQMcjH7Aw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704302115; c=relaxed/simple; bh=NlhbCoYUGf0ZskTu/2Gqtu/oVZdmjkBqGdARMztNIus=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Fw9ETyHh5N9iCT1GKJhtlfsR6CbV90Y9n2dkFL11jiRvXyxViaWxY/wDR2LMgGUimO7Ohtxpbe2taC+bk5rVYxFykid4jqyk/X1x9iFR30m5B3GwtIW1zJI3VTHt57N8ft4m3cEHpWZ1a60AYojgWHCyljKHa7Ft77LmLb+Zb2E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2ccc6e509c8so6222681fa.0 for ; Wed, 03 Jan 2024 09:15:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704302110; x=1704906910; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ygbsKo93a+seyCHXZZM5emgBdxXropgCfTSzN5w4vEU=; b=ljv0Y8RYBaLlz/y07UzFHgLpjZDear6EKT4EAYIwXDrTFI3zOLRc6by43yy2H/yxYu gcPh7Np2YB6ULP1+i/vVFdTm4y2jsbfXIvznYZ1dZRewjLdn+5S9snnLEeLDB7uZMDtx wI8nfXct3Ae/YiNImtvr/i301f3MZTlHzc/9pRMKkGgSDN/WA4CNhDw6jE87H1gWts3N 2zWkRHoDjtKAm9xroKFrpYPEWkxP4E3BGL7Lp8HMEFWVMmzGT6u+oJM8nHxZtKDQPgeU Lkwgy/AQvkXeBwvPBGA16vWpxWB9jaTOIfo7bxkdTkWSy0XCOYPnEGFyWR//mIWP998C KKuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704302110; x=1704906910; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ygbsKo93a+seyCHXZZM5emgBdxXropgCfTSzN5w4vEU=; b=f4jDc/yosAK7o2ZAS4sMWsvDY7UjC9e+xDSGEHo/9uRPizvYE3mtaTJdrWXKLy6UbM WwW9gyzUkelW4khGXQym/3okiN23UhdKroHAU0WF9IOeZ0QU2vSvj7fw3uBdQY+DCPmh ZX1Zu/48UaWFTK/rnbicaK2cCT7XSfOXBKT1nIcvv4i4eO5PVw5ta4WkcuMODRieeHnc CFD05jg4D2B37ETf7PAq6vTLtZmSVWBvu8GMkyjWlgbIFOrppaW6hFNU5uHNj4043+hW XaGjCU4gZgE8UUTRo0Rn8ISlBaVcpazNoT4DSL7XipxbcbMUcVSXEFpQjPsKx9cdl0IA 91Hg== X-Gm-Message-State: AOJu0YyXBBPrY+sLtW9TmxVqyi3qSCUApiFHmmXgkso1A5VKKJdNIIc1 qYP+1zvFWuDczpVBvz+JHw8AmzVQx5k= X-Google-Smtp-Source: AGHT+IHkOkxcUJSzbnj4WbNE5WCThynJn55Wvz3sIUseW4jelHsS8RS/2Wg0fG/9Y0/WiEhSRTLGUg== X-Received: by 2002:a19:f706:0:b0:50e:7bed:af45 with SMTP id z6-20020a19f706000000b0050e7bedaf45mr778752lfe.33.1704302110144; Wed, 03 Jan 2024 09:15:10 -0800 (PST) Received: from surface-pro-6.. ([2a00:1370:818c:b32f:ebdc:fd0:376b:8006]) by smtp.gmail.com with ESMTPSA id y23-20020a196417000000b0050e6d84d177sm3546068lfb.279.2024.01.03.09.15.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 09:15:09 -0800 (PST) From: Sergey Bugaev To: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: [PATCH 06/23] mach: Drop SNARF_ARGS macro Date: Wed, 3 Jan 2024 20:14:39 +0300 Message-ID: <20240103171502.1358371-7-bugaevc@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240103171502.1358371-1-bugaevc@gmail.com> References: <20240103171502.1358371-1-bugaevc@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org We're obtaining arguments from the stack differently, see init-first.c. Signed-off-by: Sergey Bugaev --- sysdeps/mach/sysdep.h | 7 ------- sysdeps/mach/x86/sysdep.h | 14 -------------- 2 files changed, 21 deletions(-) diff --git a/sysdeps/mach/sysdep.h b/sysdeps/mach/sysdep.h index 8eeac45b..3e0553d8 100644 --- a/sysdeps/mach/sysdep.h +++ b/sysdeps/mach/sysdep.h @@ -56,13 +56,6 @@ /* This is not used on all machines. */ #endif -/* Set variables ARGC, ARGV, and ENVP for the arguments - left on the stack by the microkernel. */ -#ifndef SNARF_ARGS -#define SNARF_ARGS(argc, argv, envp) -#error SNARF_ARGS not defined by sysdeps/mach/MACHINE/sysdep.h -#endif - /* LOSE can be defined as the `halt' instruction or something similar which will cause the process to die in a characteristic way suggesting a bug. */ diff --git a/sysdeps/mach/x86/sysdep.h b/sysdeps/mach/x86/sysdep.h index ed9f7f46..63be5638 100644 --- a/sysdeps/mach/x86/sysdep.h +++ b/sysdeps/mach/x86/sysdep.h @@ -25,20 +25,6 @@ #define LOSE asm volatile ("hlt") -#define SNARF_ARGS(entry_sp, argc, argv, envp) \ - do \ - { \ - char **p; \ - argc = (int) *entry_sp; \ - argv = (char **) (entry_sp + 1); \ - p = argv; \ - while (*p++ != NULL) \ - ; \ - if (p >= (char **) argv[0]) \ - --p; \ - envp = p; \ - } while (0) - #define STACK_GROWTH_DOWN /* Get the machine-independent Mach definitions. */